I’m just making a Python console app that converts text to an mp3 file. This is my Python code : from gtts import gTTS import os text=input() mp3 = gTTS(text = text,lang=’en’,slow=False) mp3.save("testfile.mp3") os.system("testfile.mp3") # enter to exit input() When I run this using VSCode it works perfectly. However when I’m running it after I ..
This is my code that generates a audio file of what is written in variable text. I want to take a pause between Hello and world. How can I do that ? from gtts import gTTS import os text = "Hello **pause** World" language = "en" myobj = gTTS(text = text, lang = language, slow ..
I’m facing this issue whenever I am installing and importing gTTS. Issue in installing: ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: ‘C:Python310Scriptsgtts-cli.exe’ -> ‘C:Python310Scriptsgtts-cli.exe.deleteme’ Issue in importing: Traceback (most recent call last): File "C:/Users/User/Desktop/check.py", line 1, in <module> from gtts import gTTS ModuleNotFoundError: No ..
Please. stuck on this for two days with solution, don’t know what to do next, help would be highly appreciated. enter image description here Source: Python..
Hey guys i’m making a alarm clock on my raspberry pi . When I compile it on the Raspberry Ide the programm works perfectly. My raspberry uses internet module like ggtS or html requests. My problem is that my programm can’t run with crontab because of some imports. import random ###### from gtts import gTTS ..
I have the following code with gTTS from gtts import gTTS obj = gTTS(text = "Hello there", lang = ‘en’) obj.save("hello.mp3") For some reason, however, (I’m using version 2.2.3, python 3.7.3) it was working just fine a few days ago on my raspberry pi 4 Model B and it suddenly stopped again. I fixed it ..
I’m making an assistant to control/manage 3D printers. It works when it’s just a text based assistant, but since I’ve tried to add speaking and listening to the bot things aren’t working very well. Why is the assistant not speaking the responses? When I run the code with all of the listening and speaking functions ..
I am using Playsound and gtts in Spyder IDE which creates an mp3 file and then plays it. import gtts from playsound import playsound #pass text to gTTS object # make request to google to get synthesis english = gtts.gTTS("Hello world") #retrieved the actual audio speech from the API # save the audio file english.save("hello.mp3") ..
”’ from tkinter import * import tkinter as tk from tkinter import ttk from PIL import ImageTk, Image # pip install pillow from googletrans import Translator # pip install googletrans==3.1.0a0 from tkinter import messagebox import gtts from gtts import gTTS from playsound import playsound import os root = tk.Tk() root.title("Ashin’s Langauge Translator") root.geometry(‘530×330’) root.maxsize(530, 330) ..
so the code was working fine yesterday but after saving it and trying to run it it stopped working even though i didn’t change anything in the code i’ve tried installing an old version of playsound library but that didn’t work either. when i use the speak function it works but when i try to ..