TARS
TARS copied to clipboard
Error while taking input
First i got this error =>
File ".\voice_input.py", line 26, in speak speech.save('command.mp3') File "C:\ProgramData\Miniconda3\lib\site-packages\gtts\tts.py", line 248, in save with open(str(savefile), 'wb') as f: PermissionError: [Errno 13] Permission denied: `'command.mp3
Then i fixed it by doing os.remove()
but after doing it i got another error =>
Traceback (most recent call last):
File "C:\Users\Aditya\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Users\Aditya\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 109, in _get_module_details
import(pkg_name)
File "C:\Users\Aditya\tars\TARS\tars2.py", line 128, in
how and from where do i close this file.
There is a possibility another audio.mp3 in your directory is causing the problem.
Try replacing the function talk()' with a pyttsx3 function
import pyttsx3
def speak(audio):
engine = pyttsx3.init()
engine.setProperty("rate", 215)
print("TARS " + audio)
engine.say(audio)
engine.runAndWait()
#this function can replace gtts and is more stables`
Thanks for the help!!
On Thu, Jan 14, 2021 at 10:10 AM nuggetcatsoftware [email protected] wrote:
There is a possibility another audio.mp3 in your directory is causing the problem.
Try replacing the function talk()' with a pyttsx3 function import pyttsx3 def speak(audio): engine = pyttsx3.init() engine.setProperty("rate", 215) print("TARS " + audio) engine.say(audio) engine.runAndWait()
#this function can replace gtts and is more stables`
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/raszidzie/TARS/issues/4#issuecomment-759920929, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANLPC4F3WOWFU7DKFDTFA2LSZZYU7ANCNFSM4O745KBQ .