text-to-speech

TextToSpeech with API 21

对着背影说爱祢 提交于 2019-11-30 12:00:44
问题 Can someone help me using TTS with API 21. All examples available are deprecated with version 21 Here's my code giving error on last line: Calendar cal = Calendar.getInstance(); cal.getTime(); SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); String text = sdf.toString(); btn.setText("Ouvir as Horas"); TextToSpeech tts = new TextToSpeech(NightClock.this,(TextToSpeech.OnInitListener) NightClock.this); tts.setLanguage(Locale.US); tts.speak(text, TextToSpeech.QUEUE_FLUSH, null); In Android

Is it possible to use TTS in iOS

不羁的心 提交于 2019-11-30 07:34:44
Does anyone know if it is possible to implement TTS in iOS development like in Android? Is it in a library or something? I believe I heard something about utility and TTS in iOS but I have had difficulty finding any documentation on this matter. Any help would be appreciated. Joseph Nardone flite TTS has been turned into an iOS library available here . It is not too hard to implement. Be aware that the performance that you see in the simulator is way better than on a device and you will need to budget extra for device testing. HbashirNaij Check out my project, it's a really easy to use TTS

Recording synthesized text-to-speech to a file in Python

笑着哭i 提交于 2019-11-30 07:30:23
问题 I am attempting to find a way to take synthesized speech and record it to an audio file. I am currently using pyttsx as my text-to-speech library, but there isn't a mechanism for saving the output to a file, only playing it directly from the speakers. I've looked into detecting and recording audio as well as PyAudio, but these seem to take input from a microphone rather than redirecting outgoing audio to a file. Is there a known way to do this? 回答1: You can call espeak with the -w argument

Exception with Freetts when using kevin or mbrola

空扰寡人 提交于 2019-11-30 07:01:01
问题 I am trying to run a program using freetts. I am able to compile the program however I am not able to use kevin or mbrola voices I get the follwing output message at the end System property "mbrola.base" is undefined. Will not use MBROLA voices. LINE UNAVAILABLE: Format is pcm_signed 16000.0 Hz 16 bits 1 channel big endian import javax.speech.*; import javax.speech.synthesis.*; import java.util.*; class freetts { public static void main(String[] args) { try{ Calendar calendar = new

How come millisUntilFinished cannot detect exact CountDownTimer intervals?

与世无争的帅哥 提交于 2019-11-30 06:01:31
问题 Hey all, so there is a rather small but annoying problem with the CountDownTimer.. Currently I have an interval set to 1000. And I am trying to detect the amount of milliseconds left in my onTick() method. So that I can use Text To Speech when there are 20 seconds left, 10 seconds left, etc. Well if I use: //Speak when 20 seconds left if (millisUntilFinished == 20000) { tts.speak("You have 20 seconds left.", TextToSpeech.QUEUE_FLUSH, null); } The timer is not able to detect the 20000

text to phonemes converter

若如初见. 提交于 2019-11-30 05:30:25
I'm searching for a tool that converts text to phonemes, (like text to speech software) I can program one but it will not be without errors and takes a lot of time! so my question is: is there a simple tool for converting e.g. "hello" to "HH AH0 L OW1" maybe some command-line tool so i can capture the stdout? i'm searching for the phonemes in 'Arpabet' style (see the 'hello' example). espeak does something like that but the output is not in Arpabet style and the phonemes are not split by some determiner. If you had searched for Arpabet on wiki you would have found your answer. The CMU guys

How to save text-to-speech as a wav with Microsoft SAPI?

好久不见. 提交于 2019-11-30 04:25:41
I need to turn a text into speech and then save it as wav file. The following C# code uses the System.Speech namespace in the .Net framework. It is necessary to reference the namespace before using it, because it is not automatically referenced by Visual Studio. SpeechSynthesizer ss = new SpeechSynthesizer(); ss.Volume = 100; ss.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Adult); ss.SetOutputToWaveFile(@"C:\MyAudioFile.wav"); ss.Speak("Hello World"); I hope this is relevant and helpful. And as I've found for how to change output format, we code something like this : SpeechAudioFormatInfo

How to set volume for text-to-speech “speak” method?

跟風遠走 提交于 2019-11-30 04:04:57
I'm at a lost. I want to be able to adjust the speak volume. Whatever I do, I can't increase its volume. How do I make it as loud as that found in the Android settings (as below)? System Settings -> Voice input and output -> Text-to-Speech settings -> Listen to an example My code at this moment is: AudioManager mAudioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE); mAudioManager.setSpeakerphoneOn(true); int loudmax = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_NOTIFICATION); mAudioManager.setStreamVolume(AudioManager.STREAM_NOTIFICATION,loudmax, AudioManager.FLAG_PLAY

Missing languages in TTS android

早过忘川 提交于 2019-11-30 04:02:11
问题 I am working on an android application that uses the TextToSpeech functionality provided by google and have followed this example: TTS Example from Google I want to know with this line: int result = mTts.setLanguage(Locale.US); if (result == TextToSpeech.LANG_MISSING_DATA || result == TextToSpeech.LANG_NOT_SUPPORTED) { // Lanuage data is missing or the language is not supported. } What can I do if the Language data is missing off the users device? The app will not continue if the data is not

Python Text to Speech in Macintosh

可紊 提交于 2019-11-30 04:00:19
Are there any libraries in Python that does or allows Text To Speech Conversion using Mac Lion's built in text to speech engine? I did google but most are windows based. I tried pyttx. I tried to run import pyttsx engine = pyttsx.init() engine.say('Sally sells seashells by the seashore.') engine.say('The quick brown fox jumped over the lazy dog.') engine.runAndWait() But I get these errors File "/Users/manabchetia/Documents/Codes/Speech.py", line 2, in <module> engine = pyttsx.init() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyttsx-1.0.egg/pyttsx/_