text-to-speech

Android TextToSpeech behaves irregular

梦想的初衷 提交于 2020-01-02 15:08:18
问题 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 extends AppCompatActivity { private TextToSpeech textToSpeech; private boolean isInitialized = false; private MainActivity mainActivity; int ctr = 0; private String words[] = {"ord", "kula", "fotboll"}; @Override protected void onCreate(Bundle

Play an audio file as soon as Text To Speech is completed in Android

孤者浪人 提交于 2020-01-02 05:34:05
问题 I'm trying to develop an Android app where as soon as the text to speech is completed an audio file has to be played. How to do this? 回答1: If I didn't get wrong idea, you want to use text-to-speech to read some text and store the speech audio into phone in the meantime? And play the audio later? Have you checked AudioRecordTest? You can record audio and then play it later. Worth to try but I don't think you can get a good quality from the microphone. Hope this helps:) By the way, as far as I

Text-to-Speech in Emacs

余生长醉 提交于 2019-12-31 16:47:36
问题 I'm not blind, I just want to have a way to have my Windows machine read the contents of a buffer outloud. Here are the basic requirements: Read any English text buffer. Pause the reading at any time and resume at any time (not wait a few minutes for a big buffer to finish when someone walks into my office). Adjust the read-back speed at play-time. Highlight the text currently being read (optional) I found a couple of possible solutions: Emacspeak: Designed for the blind. Looks like a stand

Errno 13 Permission denied: 'file.mp3' Python

送分小仙女□ 提交于 2019-12-31 06:28:12
问题 I am getting an error when writing to an audio file. Basically, I am overwriting the data in the mp3 whenever my function gets called and then playing it. It works the first time through, but then gives me [Errno 13] Permission denied: 'file.mp3' then on. Here is the code: def speech(self, response): audio_file = "response.mp3" tts = gTTS(text=str(response), lang="en") tts.save(audio_file) pygame.mixer.init() pygame.mixer.music.load(audio_file) pygame.mixer.music.play() Error is on the tts

Errno 13 Permission denied: 'file.mp3' Python

天涯浪子 提交于 2019-12-31 06:26:29
问题 I am getting an error when writing to an audio file. Basically, I am overwriting the data in the mp3 whenever my function gets called and then playing it. It works the first time through, but then gives me [Errno 13] Permission denied: 'file.mp3' then on. Here is the code: def speech(self, response): audio_file = "response.mp3" tts = gTTS(text=str(response), lang="en") tts.save(audio_file) pygame.mixer.init() pygame.mixer.music.load(audio_file) pygame.mixer.music.play() Error is on the tts

HTML5 speech input and Google Translate text-to-speech, problem in Chrome

余生长醉 提交于 2019-12-31 03:27:05
问题 I'm creating a voice/text-memo web application. Here: http://gustavstromberg.se/sandbox/html5/localstorage/ look at its source (very short, most of it is css) This is: Voice recognition, works only in chrome as far as I know. Local Storage, to store notes as text. Google Translate text-to-speech. Everything works, but in different browsers. The voice input works perfect, only in chrome. The text-to-speech works in safari. To dynamically load the memo into the audio>source element i use: $("

Convert Toast message to text

别等时光非礼了梦想. 提交于 2019-12-31 03:10:31
问题 How can I convert this TOAST message to voice in Android? Example Toast.makeText(MainActivity.this, "I am enter code here" +positive[+ position]+ " always", Toast.LENGTH_SHORT).show(); 回答1: First import the package import android.speech.tts.TextToSpeech; Then initialize private TextToSpeech tts; tts = new TextToSpeech(this, this); Finally make a function like this private void speakOut() { String text = txtText.getText().toString(); tts.speak(text, TextToSpeech.QUEUE_FLUSH, null); } Woops. I

Global TTS in Android

本秂侑毒 提交于 2019-12-31 01:51:09
问题 Hi I am devloping an application for blind users so that I use very often text to speech as practicaly the only one method how to respond on user actions. I decided to make one global TTS instance running as long as the app. I have implemented it this way package com.simekadam.blindguardian; import android.content.Context; import android.speech.tts.TextToSpeech; import android.speech.tts.TextToSpeech.OnInitListener; public class SpeechHelper implements OnInitListener { private static

what to do for voice application for ios?

只愿长相守 提交于 2019-12-30 14:26:05
问题 how to make Vlingo like application? is there any api that can be used for making apps for ios? Please provide some guide line or any tutorials or an help or comment will be appreciated Thanks in advance i also like to know how the talking ben the dog and talking tom cat is working as we talk it repeats it in funny voice. how it is possible? 回答1: For Speech Recognition on iOS, there have been many similar questions. Please see Speech to text Conversion.? or Text-to-speech (voice generation)

Using text to speech APIs in android application

可紊 提交于 2019-12-30 12:14:51
问题 I want to use TTS (Text to Speech) APIs in my android application.Now i have one quetions - Is it support TURKISH language ? I also want to highlight word in textview when that perticular word is being spoke. How can i do it ? Can anybody help me ? Thanks in advance ! 回答1: Does it support TURKISH language This may vary on different handsets/flavours of Android. You can check it out for yourself using the mTTS.isLanguageAvailable(new Locale("tr", "TUR")); I also want to highlight word in