react-native-voice / voice

:microphone: React Native Voice Recognition library for iOS and Android (Online and Offline Support)
MIT License
1.8k stars 484 forks source link

Providing audio file as input to speech to text #52

Open daniamurad opened 6 years ago

daniamurad commented 6 years ago

Can we provide a short audio file (.mp3) as an input to react-native-voice and get the corresponding text? Since it does not allow to save the audio file, we need to use the audio file later as well.

ohtangza commented 6 years ago

The function you mentioned is something lots of companies provide for their paid service (such as Google Speech Recognition API, IBM Watson, Microsoft Oxford API). Although Apple allows to access it with AudioEngine (low-level API), Google will not provide it because they are already selling it.

In terms of whether this library will deal with those function, we need further discussion because it will break the cross-platform support.

lfoliveir4 commented 4 years ago

@daniamurad Did you solved your problem?

punjasin commented 4 years ago

how about get audio file from react-native-voice is it possible ?

victor012888 commented 4 years ago

how about get audio file from react-native-voice is it possible ?

Its impossible I tried

punjasin commented 4 years ago

how about get audio file from react-native-voice is it possible ?

Its impossible I tried

i already found solutions on android you need to make custom activity and use startactivityforresult to start reconizing and it will create temp audio file in app private folder (cons is it need to show pop up with microphone button in order to get a file)

for IOS u can simply call save audio function in thier code

safaiyeh commented 4 years ago

@punjasin is this an issue of the file is not being supported in React Native core to pass to libraries? Or are you expecting RN core to handle