#🔒 Someone pls help me we Ai Siri code for python pls help I beg yall

20 messages · Page 1 of 1 (latest)

remote heron
#

import speech_recognition as sr
import pyttsx3
import datetime
import wikipedia
import webbrowser
import time

Initialize text-to-speech engine

engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id)

def speak(text):
engine.say(text)
engine.runAndWait()

def wish_me():
hour = datetime.datetime.now().hour
if hour >= 0 and hour < 12:
speak("Karabo, Good Morning!")
elif hour >= 12 and hour < 18:
speak("Karabo, Good Afternoon!")
else:
speak("Karabo, Good Evening!")

def take_command():
r = sr.Recognizer()
with sr.Microphone() as source:
print("Listening...")
audio = r.listen(source)
try:
statement = r.recognize_google(audio, language="en-in")
print(f"User said: {statement}\n")
return statement
except sr.UnknownValueError:
speak("Karabo, I didn't hear you. Please say that again.")
return "none"
except sr.RequestError:
speak("Karabo, there seems to be an issue with the speech recognition service.")
return "none"

if name == "main":
speak("Loading Gee")
wish_me()

while True:
    speak("Wassup bro, what can I do for you?")
    statement = take_command().lower()

    if statement == "none":
        continue

    if "goodbye" in statement or "ok bye" in statement or "turn off" in statement:
        speak("I gotta bounce, see you later!")
        break

    if "wikipedia" in statement:
        speak("Search
delicate sphinxBOT
#

@remote heron

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

remote heron
#

I got this error guys

teal epoch
#

!code

delicate sphinxBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

remote heron
#

Here's the Ai code pls help

quaint cosmos
#

Can you share the pastebin link itself? We can view the text that way, instead of a screenshot.

#

@remote heron

remote heron
#

Here it is

teal epoch
#

!e ```py
import sys
print(sys.version)

delicate sphinxBOT
remote heron
#

Wich is 3.8

teal epoch
#

yeah idk I don't see anything in there that should be erroring in 3.8

remote heron
#

Ok lemme try again

remote heron
delicate sphinxBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.