Questions tagged [gtts]

For questions about the Google Text-to-Speech (gTTS) Python library and CLI tool.

gTTS (Google Text-to-Speech) is a library and tool which interfaces with the Google Translate text-to-speech API.

References:

131 questions
7
votes
7 answers

ValueError: Unable to find token seed! Did https://translate.google.com change?

I am making an assistant that uses gTTS and Google Speech but this error appears. It is fine with speech recognition as it can recognize without faults. I tested with print function however when I want text-to-speech, this bug comes. ... import…
sh karri
  • 99
  • 1
  • 6
7
votes
3 answers

Python gTTS, is there a way to change the speed of the speech

It seems that on gTTS there is no option for changing the speech of the text-to-speech apart from the slow argument. I would like to speed up the sound by 5%. Any suggestion on how I can do it? Best. tts_de = gTTS("Hallo, guten tag.", lang =…
J_yang
  • 2,672
  • 8
  • 32
  • 61
5
votes
1 answer

How to do text to speech conversion in Google Colab?

I am aware of libraries like Google Text to Speech. However, the same does not work in Colab. I recently came across a complex notebook in Colab…
4
votes
4 answers

cannot import name 'gTTS' from partially initialized module 'gtts'

ImportError: cannot import name 'gTTS' from partially initialized module 'gtts' (most likely due to a circular import) (C:\Users\Gayathri Sai\PycharmProjects\audibook\gtts.py)
vcscharan
  • 41
  • 3
4
votes
2 answers

gtts.tts.gTTSError: 429 (Too Many Requests) from TTS API. Probable cause: Unknown

I've installed GTTS using pip with python and the first copule of iterations seemes fine. However now I keep getting this error: gtts.tts.gTTSError: 429 (Too Many Requests) from TTS API. Probable cause: Unknown I've removed it from a loop but it…
Isiah
  • 195
  • 2
  • 15
4
votes
2 answers

How to directly play speech in python without saving to mp3?

I am trying into convert text to speech in Python using the gTTS module. Is there a method you can use which does not involve saving the audio to an mp3 file and instead plays the it directly? I have looked online for a while but I still can't find…
4
votes
2 answers

How can I efficiently convert gtts audio into pydub audiosegments?

I want to manipulate gtts audio in pydub but I am not sure how to translate gtts file like to pydub audio. I know that I can convert google text to speech audio to an mp3 and I know that I can import an mp3 with pydub, but this process is…
3
votes
2 answers

How to use text languages in Python

I'm trying to create a text-to-speech Python program. I already have it working in English, though, I need other languages too. How can I use the same methods for other languages like Chinese? coding: from gtts import gTTS import os myText =…
3
votes
1 answer

How to use muti-language in 'gTTS' for single input line?

I want to convert text to speech from a document where multiple languages are included. When I am trying to do the following code, I fetch problems to record each language clearly. How can I save such type mixer text-audio clearly? from gtts import…
Md. Rezwanul Haque
  • 2,882
  • 7
  • 28
  • 45
3
votes
1 answer

How to pause text during speaking in gTTS

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 =…
3
votes
2 answers

gTTS package installation using anaconda on windows

I am creating my own chatbot and so I need the gTTS package but I can not install it with conda on windows, every time the installation ends with a failure. I tried: conda install gTTS and also: conda install -c conda-forge gTTS The result: Solving…
anonymous
  • 31
  • 1
  • 3
2
votes
1 answer

GttS Wait Until words is complete Python

I am using gtts to read words from a list and say them one by one. The current problem I am facing is that when I play the words one by one in the list they start at the same time. Here is the reproduced result: def…
GCIreland
  • 145
  • 1
  • 16
2
votes
1 answer

How to run a multi-processing pool using gtts in python?

I'm trying to do bulk text to audio conversion without using cloud services like AWS polly. gtts gives good quality text to speech but requires an internet connection to get results. Running tts for individual strings using this code for example is…
Gaurav Hazra
  • 333
  • 1
  • 11
2
votes
1 answer

Playsound only plays the mp3 file once and then gives the error "Permission Denied"

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…
SamaSamrin
  • 79
  • 2
  • 11
2
votes
1 answer

Pygame mixer.music.load() does not work with gTTs

I'm trying to play a gTTs voice with pygame.mixer.music.load() only. I don't want to save the voice into a file, so I saved it into a BytesIO stream. gTTs returns .mp3 audio which I know has limited support by pygame, so I tried to convert the .mp3…
MmBaguette
  • 340
  • 3
  • 13
1
2 3
8 9