text-to-speech

IllegalArgumentException: Invalid int: “OS” with Samsung tts

假装没事ソ 提交于 2019-11-28 10:40:55
I'm using Text to speech in my android application.It is working Fine with Google TTs and espeak, But when i used with Samsung TTS it gives following Exception. java.lang.IllegalArgumentException: Invalid int: "OS" at android.os.Parcel.readException(Parcel.java:1429) at android.os.Parcel.readException(Parcel.java:1379) at android.speech.tts.ITextToSpeechService$Stub$Proxy.isLanguageAvailable(ITextToSpeechService.java:482) at android.speech.tts.TextToSpeech$10.run(TextToSpeech.java:1084) at android.speech.tts.TextToSpeech$10.run(TextToSpeech.java:1081) at android.speech.tts.TextToSpeech

AVSpeechSynthesizer is not working After use one time

我是研究僧i 提交于 2019-11-28 10:23:54
问题 I'm using AVSpeechSynthesizer for voice out some text data, it'll work for first time but it didn't work after that. I'm getting below messages. Error:- AppName[859:101035] [AXTTSCommon] Failure starting audio queue alp! 2018-10-26 18:06:53.253536+0530 AppName[859:101035] [AXTTSCommon] _BeginSpeaking: couldn't begin playback Below i share my code. let synth = AVSpeechSynthesizer() fileprivate func speakText(voiceOutdata: String ) { let utterance = AVSpeechUtterance(string: voiceOutdata)

setOnUtteranceProgressListener not at all working for Text To Speech for API > 21

拥有回忆 提交于 2019-11-28 09:58:05
问题 I want setOnUtteranceProgressListener should notify a Toast after the speech is completed.It seems not working. I have used setOnUtteranceProgressListener and on the speak function i have mentioned the paramaters as follows.. Bundle params = new Bundle(); params.putString(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, MainActivity.this.getPackageName()); I have given a "UniqueId" while calling speak function as follows. myTTS.speak(message,TextToSpeech.QUEUE_FLUSH,params,"UniqueId"); In My

How to store text to speech output as WAV file?

给你一囗甜甜゛ 提交于 2019-11-28 09:32:20
I am using the following code to store Text to Speech output as wav file in my application. I am not sure where is the error, can you please take a look into that and suggest me? public class MainActivity extends Activity { Button store, play; EditText input; String speakTextTxt; TextToSpeech mTts; HashMap<String, String> myHashRender = new HashMap<String, String>(); String tempDestFile ; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); store = (Button) findViewById(R.id.button1); play = (Button)

Android TextToSpeech.synthesizeToFile() file is not created

北慕城南 提交于 2019-11-28 09:00:46
问题 I am trying to implement a pause and play function to some text using tts and MediaPlayer. However, I can't seem to be able to create a .wav file using the synthesizeToFile function. I already added the required permission to the xml file: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> This is the file creation method I am currently using: private String envPath = Environment.getExternalStorageDirectory() .getAbsolutePath() + "/Download"; private Uri fileUri;

Any TTS api for Android in turkish?

a 夏天 提交于 2019-11-28 08:40:28
问题 Is there any free TTS (text-to-speech) service for Android in Turkish? I've not found anything useful in google. 回答1: I didnt try it yet on android, but I recently discovered this one: http://www.ispeech.org The speech quality looks promising on the web app. Give it a shot :) 回答2: Here you can use Google TTS as below: strText = converToTurkishCharacter(strText); if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { textToSpeech = new TextToSpeech

When to use the UtteranceProgressListener

若如初见. 提交于 2019-11-28 08:31:50
问题 I have a FrameLayout with two ImageButtons ( Play , Stop ). By default Play button is VISIBLE , Stop button is GONE Clicking the Play starts the TTS Engine which reads the text. On Completion of reading the text, I want to set the Visibility of Play to GONE , Stop to VISIBLE Should I use the UtteranceProgressListener to serve the purpose? If not, How can I perform the above action? What is the purpose of UtteranceProgressListener? 回答1: Did you perhaps mean that: reading starts -> Play is gone

Does TTS API work without network connection on android?

做~自己de王妃 提交于 2019-11-28 08:31:30
问题 hello i'm a student of engineer school and i was wondering if TTS(Text to Speech) works in offline environment for android. 回答1: You require an internet connection for the Text to Speech API, but you can use Text to Speech in offline mode by applying the following settings. Currently not all devices support offline speech input. However you can follow this discussion to enable offline speech input for supported devices. 1. On your device go to Settings -> Language and Input. Click on the

Unresolved reference inside anonymous Kotlin listener

跟風遠走 提交于 2019-11-28 07:57:15
问题 I have the code below. It is Kotlin. Any idea why textToSpeech from textToSpeech.setLanguage(Locale.UK) is telling that there is no reference resolved for textToSpeech ? val textToSpeech = TextToSpeech( applicationContext, object : TextToSpeech.OnInitListener { override fun onInit(status: Int) { if (status == TextToSpeech.SUCCESS) { textToSpeech.setLanguage(Locale.UK) } } }) At first I assumed it is an Idea kotlin plugin bug, but it seems that it actually can't be compiled 回答1: Kotlin has

TTS output always going to A2DP

試著忘記壹切 提交于 2019-11-28 07:51:43
My Android tutorial states that I can explicitly tell the TTS engine which stream to use: For music playback: params.put(TextToSpeech.Engine.KEY_PARAM_STREAM, String.valueOf(AudioManager.STREAM_MUSIC)); And for phone calls: params.put(TextToSpeech.Engine.KEY_PARAM_STREAM, String.valueOf(AudioManager.STREAM_VOICE_CALL)); My understanding is that audio routing to a Bluetooth headset works such that STREAM_MUSIC goes to A2DP (aka "media audio" in Android Bluetooth settings) and STREAM_VOICE_CALL goes to HSP (aka "phone audio" in Android Bluetooth settings). But regardless whether I use STREAM