Questions tagged [google-text-to-speech]

Refers to issues related to Google's APIs for text to speech (primarily the cloud text to speech API)

Google Text-to-Speech is a screen reader application developed by Google Inc for its Android operating system. It powers applications to read aloud (speak) the text on the screen.

More Info

476 questions
4
votes
0 answers

Automatic ducking not working for text-to-speech (Android 8+)

As described in documentation, the automatic ducking feature has been introduced in Android 8.0. Ducking means that if your music application has been interrupted by some short sound (like a notification, for ex.), your application will continue…
4
votes
2 answers

Google Cloud TTS engine ignoring break SSML tags on large chunks of text

I'm trying to generate audio from a big paragraph, but Google is ignoring the SSML tags. The tags are respected if I trim the text to around three lines, but more than that makes them invisible. $body = [ 'input' => [ 'ssml' =>…
4
votes
0 answers

Highlight words as they are being spoken with google text-to-speech

I`m making a web app using react and want to highlight the words as they are being spoken, using google text-to-speech. I know that with native speech synthesis API, you can use onboundary event. Is there a similar way you can do this with google…
4
votes
1 answer

gTTS (Google-Text-to-Speech) Error: Audio gets saved but does not play automatically

This is my code for text-to-speech conversion: from gtts import gTTS import os tts=gTTS(text="Hello World",lang="en") tts.save("hello.mp3") os.system("mpg321 hello.mp3") I already installed gTTS through the command prompt(pip install gTTS). But…
Blue Berry
  • 107
  • 1
  • 2
  • 7
4
votes
1 answer

Android Text-To-Speech speak Cantonese with "alphabet" programmatically

I would like to speak "A13" with "A" pronounced in "English" and "13" in "Cantonese"; Below is the code I used but it just gives me "13" in Putonghua. tts.setLanguage(Locale.ENGLISH); tts.speak("A", TextToSpeech.QUEUE_FLUSH,…
Antoine Murion
  • 773
  • 1
  • 14
  • 26
4
votes
1 answer

How to download audio result from converting text to speech using Speech Synthesis?

I'm using Speech Synthesis (Web Speech API) to convert text to speech, but I can't figure how to download produced audio. I thought about using recorder.js, but hope there is easier process to access it. For better illustration - IBM Watson…
4
votes
1 answer

Add Google TTS for a Script which works on several browsers

with your help I have now a ajax-function, which instantly react on a input-value. (Change the Submit-Button with AJAX-function for instantly reacting for an input) This function display the word of an entered number in russian. Now I want to add…
Grischa
  • 70
  • 8
  • 26
3
votes
0 answers

Google Text to Speech volume too low on iOS devices

I am using Google TTS API in a website to sound out a text string returned by a backend server. We have followed this blog's steps to setup audio streaming from browser microphone to a server and return TTS from server to browser. This…
3
votes
1 answer

Problems with Google Cloud Platform authentication

we are experiencing problems with API authentication of our project in asp-net core 3.1. Specifically we have integrated the text-to-speech service provided by Google. Locally everything works correctly, but this does not happen when the web-app is…
3
votes
2 answers

How to access Google text-to-speech beta features (March 1, 2021 release)

On March 1, 2021, Google Text-to-speech released beta features, including support for the ssml tag with name or lang attributes. I'm hoping to use these beta features, but I can't figure out what channel they were released to or how to…
3
votes
2 answers

How to play Audio in loop in Google colab

I ma trying to run the Audio in loop in google colab but it is not giving mi any output from gtts import gTTS from IPython.display import Audio for voice in ["Aniket","sachin"]: tts = gTTS("Hello {}".format(voice)) …
user12501158
3
votes
2 answers

Encode LINEAR16 audio to Twilio media audio/x-mulaw | NodeJS

I have been trying to stream mulaw media stream back to Twilio. Requirement is payload must be encoded audio/x-mulaw with a sample rate of 8000 and base64 encoded My input is from @google-cloud/text-to-speech in LINEAR16 Google Docs I tried…
HugeBelieve
  • 304
  • 1
  • 7
3
votes
0 answers

How to generate access token and implement google text to speech using Curl PHP

Am trying to implement Text to Speech using Google Text to Speech API. i have been following the documentation here. source link here is the request sample: curl -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) -H…
Nancy Moore
  • 2,322
  • 2
  • 21
  • 38
3
votes
0 answers

How do I use API key credential with Google text-to-speech client library methods?

I'd like to instantiate a TextToSpeechClient() with an API key rather than service account credentials provided in a global GOOGLE_APPLICATION_CREDENTIALS variable. Specifically, I'd like to use the following function provided on the relevant…
3
votes
1 answer

Android TextToSpeech behaves irregular

Update: After some digging I managed to find some information in the Logcat. See bottom. Edit 2: I have now created a new activity from scratch to reduce the problem. It does still not work correctly. Here is the code: public class MainActivity…
El_Loco
  • 1,716
  • 4
  • 20
  • 35