Funcția de recunoaștere vocală import speechrecognition as sr from twilio.rest import Client ... def getorder(): ... recognizer = sr.Recognizer() ... with sr.Microphone() as source: ... print("Spune comanda pentru mici...") ... try: ... audio = recognizer.listen(source) ... text = recognizer.recognize_google(audio, language="ro-RO") ... print(f"Comanda înregistrată: {text}") ... return text ... except sr.UnknownValueError: ... print("Nu am înțeles. Te rog să repeți!") ... except sr.RequestError as e: ... print(f"Eroare cu serviciul de recunoaștere vocală: {e}") ... return None ... ... # Funcția de apelare ... def call_for_mici(order): ... # Configurațiile Twilio ... account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' # SID-ul Twilio ... auth_token = 'your_auth_token' # Tokenul de autentificare Twilio ... client = Client(AC616e0d9e8fba3101f81ecc33a6a28b87, db03d84515ab0da3aa72b3bb9533bdb) ... ... # Textul comenzii ... message = f"Vreau să comand: {order}." ... ... call = client.calls.create( ... twiml=f'<Response><Say>{message}</Say></Response>', ... to="+40761848834", # Numărul destinatarului ... from="+40773840975" # Numărul Twilio asociat contului tău ... ) ... print(f"Apel inițiat cu SID: {call.sid}") ... ... # Logica principală ... if name == "main": ... order = get_order() ... if order: ... call_for_mici(order)Hello when i click run module on the code in the python idle i get an error on line 2 where the def is invalid syntax does anyone know how i solve this program and make the code run do i need to replace the def or delete some of the code cause it keeps giving me errors as i try to fix the code and debug it,i need some help to find the right solution.
https://imgur.com/a/l8ZY4Nn