text-to-speech

Speech Synthesis on iOS weird errors on loading, and no concurrency

∥☆過路亽.° 提交于 2019-12-08 00:01:52
问题 I'm using the speech synth in AVFoundation, creating an instance of a voice like this: import AVFoundation class CanSpeak { let voices = AVSpeechSynthesisVoice.speechVoices() let voiceSynth = AVSpeechSynthesizer() var voiceToUse: AVSpeechSynthesisVoice? init(){ for voice in voices { if voice.name == "Arthur" { voiceToUse = voice } } } func sayThis(_ phrase: String){ let utterance = AVSpeechUtterance(string: phrase) utterance.voice = voiceToUse utterance.rate = 0.5 voiceSynth.speak(utterance)

Trying to call Toaster or Custom function inside setOnUtteranceProgressListener

橙三吉。 提交于 2019-12-07 23:43:34
问题 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

Making a Text-To-Speech Wrapper in Android

拟墨画扇 提交于 2019-12-07 17:57:31
I am attempting to create a wrapper class for Google Android's Text-To-Speech functionality. However, I'm having trouble finding a way to have the system pause until after the onInit function has finished. Attached at the bottom is something of a solution I created based on what I found here: Android speech - how can you read text in Android? However, this solution does not seem to work. Any thoughts on why this might not be working, or what would be a good idea in order to make sure that any Speak() calls happen after my onInit() call? public class SpeechSynth implements OnInitListener {

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

Microsoft SpeechSynthesizer crackles when outputting to files and streams

末鹿安然 提交于 2019-12-07 15:46:27
I'm writing a thing that uses the SpeechSynthesizer to generate wave files on request, but I'm having problems with crackling noises. The weird thing is that output directly to the sound card is just fine. This short powershell script demonstrates the issue, though I'm writing my program in C#. Add-Type -AssemblyName System.Speech $speech = New-Object System.Speech.Synthesis.SpeechSynthesizer $speech.Speak('Guybrush Threepwood, mighty pirate!') $speech.SetOutputToWaveFile("${PSScriptRoot}\foo.wav") $speech.Speak('Guybrush Threepwood, mighty pirate!') What this should do, is output to the

How do I add a voice / language to speechSynthesis?

本小妞迷上赌 提交于 2019-12-07 12:50:11
问题 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

Slow down Twilio's TwiML “Say” command for standard text on text-to-speech

a 夏天 提交于 2019-12-07 09:19:56
问题 How can I slow down a normal content inside the "Say" verb? The spanish accent is VERY fast and most people have trouble following/understanding what is said. Ideally something like the following would be perfect: <Say voice="woman" language="es" speed="0.5">El siguiente mensaje se repetirá en español</Say> Note I made up the speed="0.5" param. That is not an option for twilio but slowing the reading of the content of that "Say" verb by half is what I am looking for. I don't think this is

Android TTS add languages

南楼画角 提交于 2019-12-07 06:26:56
问题 I would like to develop an app that uses TTS for many languages. The problem is that only few languages come with specific devices, depending on the country I suppose (I'm talking about PICO). Is there a way to use a TTS engin embedded in my apk or find somewhere online the missing PICO files and put them in the apk... or any other solution to support languages but present in the device by default? 回答1: Read this article: http://android-developers.blogspot.com/2009/09/introduction-to-text-to

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

How to pass a string + web url and receive the response using python [closed]

妖精的绣舞 提交于 2019-12-07 05:59:17
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . I'm using Python and Google Translate. When I click on Listen while translating, a sound file is generated and a URL is passed like so: http://translate.google.com/translate_tts?tl=en&q=text . I want to generate