text-to-speech

Using google Text-To-Speech (TTS) API on iOS

余生长醉 提交于 2019-12-06 06:48:29
问题 I'm using the API with this code: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [documentsDirectory stringByAppendingPathComponent:@"file.mp3"]; NSString *text = textToTranslate; //@"You are one chromosome away from being a potato."; NSString *urlString = [NSString stringWithFormat:@"http://www.translate.google.com/translate_tts?tl=en&q=%@",text]; NSURL *url = [NSURL

Swift - How can I convert Saved Audio file conversations to Text?

人走茶凉 提交于 2019-12-06 05:11:03
问题 I work on speech recognition. I solve the text-to-speech and speech-to-text with IOS frameworks. But now i want to convert saved audio file conversations to text. How can i solve this ? Thank you for all replies. 回答1: I have worked on same things which are working for me. I have audio file in my project bundle which. So I have written following code to convert audio to text. let audioURL = Bundle.main.url(forResource: "Song", withExtension: "mov") let recognizer = SFSpeechRecognizer(locale:

Trying to call Toaster or Custom function inside setOnUtteranceProgressListener

泄露秘密 提交于 2019-12-06 04:58:13
In my main Fragment, I have implemented TextToSpeech mainFragment extends Fragment implements TextToSpeech.OnInitListener . The text to speech is working fine, also i have added an UtteranceProgressListener which is working. My problem : Am unable to call any custom functions eg gotoNextChapter() or even a simple Toaster . getting error Can't create handler inside thread that has not called Looper.prepare() Any suggestions or solutions welcomed.... My code snippet: UtteranceProgressListener SpeechListener = new UtteranceProgressListener() { @Override public void onStart(String utteranceId) {

SpeechSynthesizer in ASP.NET - async error

帅比萌擦擦* 提交于 2019-12-06 04:42:13
I would like to be able to generate speech in my ASP.NET app by calling speak.aspx?text=Hello%20world . This would give a response in .wav format. So far I have a blank page with code behind: protected void Page_PreRender(object sender, EventArgs e) { using (var ss = new SpeechSynthesizer()) { MemoryStream str = new MemoryStream(); ss.SetOutputToWaveStream(str); ss.Speak(Server.UrlDecode(Request.QueryString["text"])); Response.AddHeader("Content-Type", "audio/wav"); str.WriteTo(Response.OutputStream); str.Close(); } } However this fails with message: InvalidOperationException : Asynchronous

How do I add a voice / language to speechSynthesis?

百般思念 提交于 2019-12-06 03:48:41
When I run speechSynthesis.getVoices() in Chrome, I get a list of possible voices. The list changes depending on the computer and version of Chrome. Is there any way I can extend support and add more voices? I feel like this could be done by asking a user to download a voice file for their chosen language. Do such files exist? Edit: This needs to work for both Windows and Mac computers. It also needs to be simple, so no scripts or anything that would require extensive technical knowledge. I'm hoping for a "download and install" type of thing HOW TO ADD MORE VOICE FROM MICROSOFT EDGE TO CHROME

Text to speech in Vista

限于喜欢 提交于 2019-12-06 02:31:38
问题 I did it by creating OLE object with Delphi in 2000/NT/XP as following: Voice := CreateOLEObject('SAPI.SpVoice'); Voice.speak(...) But this does not work in Vista, how can I make my program simply speak some text in Vista? 回答1: I just tried (D2009 on Vista Home Premium) with the following code and it works! unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComObj; type TForm1 = class(TForm) Button1: TButton; procedure

Android TTS Male Female Voice Change

不羁的心 提交于 2019-12-06 02:05:09
问题 I am working with TTS. But i need to change the voice of the tts from female to male and vice versa. I know i can do it by eSpeak. But problem is that. In the setting page when i select the eSpeak TTS the voice changes to male and when i choose the Pico TTS the voice turns to female. But when after changing the engine in the setting page when i try to change the voice and try to use that changed voice in my app it only speaks in male voice. I download the third party app from http://eyes-free

Constant Memory Leak in SpeechSynthesizer

时光毁灭记忆、已成空白 提交于 2019-12-05 20:31:36
问题 I have developed a project which I would like to release which uses c#, WPF and the System.Speech.Synthesizer object. The issue preventing the release of this project is that whenever SpeakAsync is called it leaves a memory leak that grows to the point of eventual failure. I believe I have cleaned up properly after using this object, but cannot find a cure. I have run the program through Ants Memory Profiler and it reports that WAVEHDR and WaveHeader is growing with each call. I have created

Text to speech not working on android device

天大地大妈咪最大 提交于 2019-12-05 19:33:52
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 android.widget.EditText; import java.util.Locale; import android.widget.Toast; import android.util.Log;