react-native-tts icon indicating copy to clipboard operation
react-native-tts copied to clipboard

How to get the audio file as mp3

Open idoor88 opened this issue 5 years ago • 4 comments

Hi, this library works when it translate the text input into sound from device, but may I use this library to get the audio mp3 file? in other words, I need to convert the text into mp3 file instead of speech on device. Thanks

idoor88 avatar Nov 13 '19 20:11 idoor88

@idoor88 did you find any way to do that? I also need that functionality

desis123 avatar Mar 07 '20 18:03 desis123

Even I need that... Any solution 😥

ibelgin avatar Jun 28 '20 02:06 ibelgin

Same here

mqtik avatar Jan 29 '21 22:01 mqtik

Does this make sense ? Got it from StackOverflow

The TTS SDK doesn't have any pause functionality that I know of. But you could use synthesizeToFile() to create an audio file that contains the TTS output. Then, you would use a MediaPlayer object to play, pause, and stop playing the file. Depending on how long the text string is, it might take a little longer for audio to be produced because the synthesizeToFile() function would have to complete the entire file before you could play it, but this delay should be acceptable for most applications.

ra1111 avatar Feb 23 '21 08:02 ra1111