text-to-speech

Start Android TTS from Broadcast Receiver or Service

两盒软妹~` 提交于 2019-11-30 16:39:25
I'm trying to get TTS to run in the background. But, I never get any sound. I have a broadcast receiver which starts a service. I put my TTS code in both of those, but it never speaks. I know the method is being called (I put a breakpoint on it), but it still doesn't work. Here's my log, but it doesn't seem to contain anything about the TTS service. 10-04 22:45:30.663: WARN/InputManagerService(209): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4423df40 10-04 22:45:37.363: INFO/PollingManager(449): calculateShortestInterval(): shortest

How to use Hindi(Indian Mother Tongue) language in Text-To-Speech?

老子叫甜甜 提交于 2019-11-30 16:19:36
问题 I am creating an application for student. I need to enter data in Hindi or Marathi. When user clicks on specific topic then user should be able to listen this topic in Hindi Or Marathi. I know How to set Language in TextToSpeech like Tts.setLanguage(Locale.US); I need to set Hindi or Marathi Language. My question is that how to use Marathi or Hindi Language in TextToSpeech. Please give me any reference or hint. 回答1: You need a text-to-speech (TTS) engine that supports Hindi. Each TTS engine

How can I save TTS output in an audio file on android?

落花浮王杯 提交于 2019-11-30 15:54:56
this is my first post here. I'm new in Android Programming. I want to create an app where I can save the output of the text to speech into an audio file to my database. I've heard about synthesizeToFile() but It's not it. Nitesh Khosla Use this code and get the mp3 file acess from the assets folder and try this code. mMediaPlayer = new MediaPlayer(); mMediaPlayer = MediaPlayer.create(this,R.raw.button); mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mMediaPlayer.start(); mMediaPlayer.setOnCompletionListener(new OnCompletionListener() { @Override public void onCompletion

Highlight text while Text to Speech is running

戏子无情 提交于 2019-11-30 15:54:36
问题 I am developing an app for ipad in which i want to add functionality as below:- When user'll tap on play button Text to speech will start to play that Text at that time, that word will be highlighted as they are being read. I know about in built feature of iOS but i want to do it programatically. I searched a lot and got as below: Link 1 Link 2 Link 3 If anyone know any API or any inbuilt framework. Let me know. Appreciate your time. 回答1: You can make use of the brilliant text-to-speech

How to use Hindi(Indian Mother Tongue) language in Text-To-Speech?

為{幸葍}努か 提交于 2019-11-30 15:50:55
I am creating an application for student. I need to enter data in Hindi or Marathi. When user clicks on specific topic then user should be able to listen this topic in Hindi Or Marathi. I know How to set Language in TextToSpeech like Tts.setLanguage(Locale.US); I need to set Hindi or Marathi Language. My question is that how to use Marathi or Hindi Language in TextToSpeech. Please give me any reference or hint. You need a text-to-speech (TTS) engine that supports Hindi. Each TTS engine has specific languages that it supports. Here is a TTS engine that supports Hindi , but this runs on Windows.

Pause Phone Ringtone while Speaking through Text To Speech and then Resume

末鹿安然 提交于 2019-11-30 15:45:20
问题 I am making a caller speaking application which speak caller name using TTS. I want to pause the ringtone while TTS is speaking then resuming the ringtone. From what i have researched we can use AudioFocus (hope so). Anyway i am using the following code Update I am using this code now. public void speak(final String talk) throws InterruptedException { final AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); int musicVolume= audioManager.getStreamVolume

Pause Phone Ringtone while Speaking through Text To Speech and then Resume

落爺英雄遲暮 提交于 2019-11-30 15:43:41
I am making a caller speaking application which speak caller name using TTS. I want to pause the ringtone while TTS is speaking then resuming the ringtone. From what i have researched we can use AudioFocus (hope so). Anyway i am using the following code Update I am using this code now. public void speak(final String talk) throws InterruptedException { final AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); int musicVolume= audioManager.getStreamVolume(AudioManager.STREAM_MUSIC); audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, musicVolume, 0);

Text To Speech functionality when app is in background mode?

和自甴很熟 提交于 2019-11-30 15:27:16
I am working on a TextToSpeech app. I write one paragraph in a UITextField , then I press the Speak button. Sound plays according to the text written in the UITextField . However, when the app is in background mode, the audio stops playing. How can I continue to play the sound in background mode? Similar to how an audio player can play a song in the background. I am using the following code for text to speech: #import "ViewController.h" #import "Google_TTS_BySham.h" #import <AVFoundation/AVFoundation.h> @interface ViewController () @property (nonatomic,strong)Google_TTS_BySham *google_TTS

Highlight text while Text to Speech is running

感情迁移 提交于 2019-11-30 14:48:21
I am developing an app for ipad in which i want to add functionality as below:- When user'll tap on play button Text to speech will start to play that Text at that time, that word will be highlighted as they are being read. I know about in built feature of iOS but i want to do it programatically. I searched a lot and got as below: Link 1 Link 2 Link 3 If anyone know any API or any inbuilt framework. Let me know. Appreciate your time. You can make use of the brilliant text-to-speech library inbuilt with iOS 7 onwards called AVSpeechSynthesizer. You can control the speech as well as get

Pause in TTS android

本秂侑毒 提交于 2019-11-30 14:35:59
I'm developing an app which would read out the text in the document and I want to add a pause and resume functionality but I can't find any pause() method in TTS. Is there any way that I can pause..? There is a way to pause. Just call TextToSpeech.playSilence() see the code below from here . It speaks some actual text along with some silence. private void playScript() { Log.d(TAG, "started script"); // setup // id to send back when saying the last phrase // so the app can re-enable the "speak" button HashMap<String, String> lastSpokenWord = new HashMap<String, String>(); lastSpokenWord.put