
PermissionError: Permission denied: 'output11.mp3' Here's the error log: Traceback (most recent call last):įile "C:/Users/Despot/Desktop/DAv3/main3.py", line 123, in įile "C:/Users/Despot/Desktop/DAv3/main3.py", line 118, in startįile "C:/Users/Despot/Desktop/DAv3/main3.py", line 96, in aiįile "C:/Users/Despot/Desktop/DAv3/main3.py", line 39, in timeįile "C:/Users/Despot/Desktop/DAv3/main3.py", line 21, in tts UPDATE: I was tweaking the code a bit and managed to fix the pyaudio error, but I got another one in the process, this time it was about permissions. When I switch to my Linux machine the speech recognition part breaks. By the way, I was using P圜harm as an IDE and working on Windows 10. Say = "Hello! My name is Dave, and I'm your personal assistant. Question_words = Įlif any(word in spoken for word in question_words):Įlif 'exit' or 'quit' or 'deactivate' in spoken: # TODO new commands should be written above this, and their trigger words below :) Response = "Invalid request detected, please try again.\n" Response = 'Please say the name of the city you would like the weather information for. Z = read('weather "%s"' % locator2.city).read() Response = "Based on your IP address, I've detected that you're located in %s. Spoken_text = polly.synthesize_speech(Text=str(text),į.write(spoken_text.read()) # from time import sleep # sleep (wai()t for) functionįrom os import popen as read # for reading command outputs "read('COMMAND').read()" Import question # module for answering any questionįrom datetime import datetime # for displaying the date and time # import locator3 # for definitely confirming auto-detection location Import locator2 # for confirming auto-detected location # import locator # for determining the location of the user based on IP address

Here's the code that I use: import boto3 # used to 'pythonize' Amazon Polly TTSįrom playsound import playsound as play # for playing sound files Make sure the path and filename are correct.

Open "output1.mp3" alias playsound_0.8842337577803419Ĭannot find the specified file. Raise PlaysoundException(exceptionMessage) WinCommand('open "' + sound + '" alias', alias)įile "C:\Program Files (x86)\Python36-32\lib\site-packages\playsound.py", line 31, in winCommand Here's the latest error I got: Traceback (most recent call last):įile "C:\Program Files (x86)\Python36-32\lib\site-packages\playsound.py", line 35, in _playsoundWin Another thing is that when it wasn't printing out the error, it would continue to play just this one sound file, whether or not it said the correct thing. One of my troubleshooting steps was to remove the file 'output1.mp3' and check if it will work that way, but it didn't. The program was working fine a few days ago, and it just stopped today.
