text-to-speech

AVSpeechSynthesizer word stress

筅森魡賤 提交于 2019-12-12 03:18:04
问题 I'm using AVSpeechSynthesizer for text to speech on 2 languages. Is there any way to specify speech stress on different part of the word? I've tried placing ' before and after desired vowel, and also using vowels with stress marks, e.g. ó , ý - which does not seem to have any impact. 回答1: In my case (language code is ru-RU), ` char helps to set word stress. 来源: https://stackoverflow.com/questions/32736130/avspeechsynthesizer-word-stress

Stopping speech recognition before using text to speech

孤人 提交于 2019-12-12 03:03:30
问题 I am implementing a dialogue application using speech recognition and text to speech. I noticed that once the recognizer is started it tries to recognition any sound including the result of the text to speech. I tried the code below to prevent it to listen to the TTS but I get this exception: E/JavaBinder(29640): *** Uncaught remote exception! (Exceptions are not yet supported across processes.) E/JavaBinder(29640): java.lang.RuntimeException: SpeechRecognizer should be used only from the

AVSpeechSynthesizer - If AVSpeechSynthesizer is Speaking & if has stopped speaking

百般思念 提交于 2019-12-12 02:01:32
问题 I want to display a view on my app whilst AVSpeechSynthesizer is speaking, and for the view to disappear when it has stopped speaking. -(void)speakText { AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init]; float speechSpeed = 0.12; AVSpeechUtterance *synUtt = [[AVSpeechUtterance alloc] initWithString:textString]; [synUtt setRate:speechSpeed]; [synUtt setVoice:[AVSpeechSynthesisVoice voiceWithLanguage:selectedVoice]]; [synthesizer speakUtterance:synUtt]; //BELOW TO APPEAR

Windows Phone Text to speech

二次信任 提交于 2019-12-12 00:34:20
问题 i am trying to use a WP speech library i got from codeplex, now the code is fine with no errors, but there are no voice output!! using wpSpeech; namespace TalkForMe { public partial class MainPage : PhoneApplicationPage { // Constructor public MainPage() { InitializeComponent(); } private void button1_Click(object sender, RoutedEventArgs e) { SpeechTTS spk; spk = new SpeechTTS ( textBox1.Text); spk.SpeakLanguage = "en"; spk.SpeakText(textBox1.Text); } } } 回答1: Your code has a very small

TextToSpeech API doesn't work when its called from OnStart

懵懂的女人 提交于 2019-12-11 20:10:05
问题 I'm using the TextToSpeech API in my code and it doesn't work when I try to call .speak() function from OnStart(), however it works when I call it from a button onClickListener(). Any idea why? Thank you. public class TtsDemoActivity extends Activity { private TextToSpeech mTts; private OnClickListener buttonListener = new View.OnClickListener() { @Override public void onClick(View arg0) { PlaySound(); } }; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated

eSpeak to mp3 in php on both windows and linux (online text-to-speech)

妖精的绣舞 提交于 2019-12-11 18:58:38
问题 I want to implement simple text-to-speech script in my web application that would dynamically generate mp3's out of given texts. It needs to run in both: my local WAMP server on windows and my online linux server eSpeak doesn't offer the highest quality in sound but at least a strong support in languages, simple implementation and also it's free. So after a little digging i realized there are not much examples of integrating it into php. I concluded StackOverflow should contain a simple

How do you make Speech to Text work in Windows (Phone) 8.1 Universal App

烂漫一生 提交于 2019-12-11 18:23:01
问题 I'm trying to write code to read aloud an incoming Toast (this was trivial in WP8.1) I have this so far Using MediaElement doesn't seem to work (code runs but no audio) either on the phone or in the emulator Using BackgroundMediaPlayer works in the emulator but not on the phone I've tried both from the UI thread (MediaElement only works on the UI thread) and BackgroundMediaPlayer from the thread that handles the incoming toast var mediaElement = new MediaElement(); using (var tts = new

Text to Speech in OS X Application

有些话、适合烂在心里 提交于 2019-12-11 18:11:58
问题 I am creating a native OS X application, and I was surprised at how difficult it is to find documentation on text-to-speech with native APIs. What would be the easiest way of having my application speak (using Alex's voice for example)? Thanks! 回答1: What you call “text-to-speech” is also commonly abbreviated as TTS and alternatively called “speech synthesis”. The Cocoa class NSSpeechSynthesizer is the API to use. The canonical sample code is CocoaSpeechSynthesisExample. There also is a guide

Is asynchronous text-to-speech voicing with SAPI 5.4 possible?

别说谁变了你拦得住时间么 提交于 2019-12-11 17:53:34
问题 I have a form and I want to allow the user to receive asynchronous (possibly overlapping) text-to-speech output based on the context of a text box whenever a button is pressed. I'm trying to do this via SAPI 5.4 (Interop.SpeechLib.dll). I recognize that System.Speech or other more "modern" functionality would work much better, but this is my current constraint. Here is a simplified version of my function: private void VoiceText(string myText) { SpVoice voice = new SpVoice(); // Create new

Pausing/muting background music in iOS

拟墨画扇 提交于 2019-12-11 16:52:21
问题 I've got an app that uses text-to-speech to occasionally give verbal cues to the user. Currently I've set it up so the TTS mixes over any music that's playing in another app. Is there any way I could temporarily pause/mute music that's playing in another app while a verbal cue plays? 回答1: You can use MPMusicPlayerController class and it's static method iPodMusicPlayer to get instance of the system (Music app) MPMusicPlayerController object. Then you can pause , play or anything else. The main