google-text-to-speech

Android TextToSpeech, change gender voices

荒凉一梦 提交于 2019-12-11 10:56:01
问题 I am about to try to make an application that when you pass by params a language and a type of voice (male or female). I do know the language change, as follows here: tts.setLanguaje(Locale loc) But as I look and read can not I find a way to change the voice for the languages you have available more than one type of voice. Please help me and Thank you very much. 回答1: US english in android don't support multi gender speaking facility.But UK english can. First you have to download(if not exist)

Firebase authentification works but I get error when using the Google Text to Speech API

夙愿已清 提交于 2019-12-11 03:03:37
问题 I've set up a small android and firebase app... Authentification works like a charm, and in the firebase console, I can see my user, logged in with the Google account. Now I am trying to experiment a little with the Text to Speech api, and in doing so, I followed this tutorial: https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/texttospeech/cloud-client I managed to make the small java app work, by setting the GOOGLE_APPLICATION_CREDENTIALS Environment variable (I followed

ModuleNotFoundError: No module named 'google.cloud'

徘徊边缘 提交于 2019-12-10 18:20:17
问题 I'm looking to use the Google "cloud text to speech" api, and I'm having the common problem of the module not being found. I've tried the solutions that most people have, only problem being that I use windows and most of the solutions are for mac or Linux (although this shouldn't be that big of an issue). I ran the 'pip list' on the command line and here's what it returned: google 2.0.1 google-api-core 1.7.0 google-auth 1.6.3 google-cloud 0.34.0 google-cloud-texttospeech 0.4.0 googleapis

pyttsx and gTTS module errors

纵饮孤独 提交于 2019-12-10 17:47:10
问题 windows 10-64bit I'm trying to use some text-to-speech tool to read text from lines of .txt document, something like this: so with pyttsx: import pyttsx engine = pyttsx.init() engine.say('my voice') engine.runAndWait() I got this error: Traceback (most recent call last): File "...", line 1, in <module> import pyttsx File "/.../pyttsx/__init__.py", line 18, in <module> from engine import Engine ImportError: No module named 'engine' now gTTS, available as gtts_token, so how to use it? because

Highlighting the text as it reads using Google text to speech

大憨熊 提交于 2019-12-08 04:36:15
问题 I am facing issue in highlighting the text as the google reads it. Every device is having its own speed of reading the text due to which highlighting text along with sound cause problem and seems inconsistent in some devices. I have tried Progressive Textview class to highlight the sentence as google start it reading. In this class, I need to define run task value in floats so as to start the highlighting speed. Bellow is the custom class code: public class ProgressTextView extends

How to free resource in PyGame mixer?

99封情书 提交于 2019-12-08 04:28:06
问题 I use gTTS python module to get mp3 from Google Text-To-Speech API and PyGame to play output mp3 files without opening external player (is there any simpler way to do it?) However it seems like PyGame mixer doesn't free file resource, even after it's quit method. phrase = "Hello!" tts = gtts.gTTS(text=phrase, lang='en') tts.save("googleTTS.mp3") f = MP3("googleTTS.mp3") mixer.init(f.info.sample_rate) mixer.music.load("googleTTS.mp3") mixer.music.play() while mixer.music.get_busy() == True:

Save an audiofile from Google Text-to-Speech to Firebase Storage using Google Cloud Storage?

依然范特西╮ 提交于 2019-12-08 02:34:21
问题 We're trying to get an audiofile from Google Text-to-Speech and save it to Firebase Storage, using a Google Cloud Function. The documentation for Google Text-to-Speech show how to get an audiofile and save it locally: // Performs the Text-to-Speech request const [response] = await client.synthesizeSpeech(request); // Write the binary audio content to a local file const writeFile = util.promisify(fs.writeFile); await writeFile('output.mp3', response.audioContent, 'binary'); console.log('Audio

Text to speech not working on android device

拜拜、爱过 提交于 2019-12-07 17:55:36
问题 Below is my code.I am unable to hear the voice in my kitkat device.Toast is appearing but voice is not playing.I am following this tutorial https://www.tutorialspoint.com/android/android_text_to_speech.htm package com.example.insert; import android.os.Parcelable; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.app.Activity; import android.os.Bundle; import android.speech.tts.TextToSpeech; import android.view.View; import android.widget.Button; import

TextToSpeech and memory leak

左心房为你撑大大i 提交于 2019-12-07 06:07:31
问题 I've been having app crashes due to an out-of-memory condition (in the program, not the programmer). MAT shows that copies of my Activity were sometimes being retained across screen rotations, and the only object keeping the bogus copies alive was each instance's TextToSpeech object. I can duplicate this behaviour using this snippet: public class MainActivity extends Activity { TextToSpeech mTts; char[] mBigChunk = new char[1000000]; // not used; just makes MainActivity instances easier to