ak1394 / react-native-tts

React Native Text-To-Speech library for Android and iOS
601 stars 154 forks source link

How to get the audio file as mp3 #131

Open idoor88 opened 4 years ago

idoor88 commented 4 years ago

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

desis123 commented 4 years ago

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

ibelgin commented 4 years ago

Even I need that... Any solution 😥

mqtik commented 3 years ago

Same here

ra1111 commented 3 years ago

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.