Skip to content
This repository has been archived by the owner on Aug 21, 2020. It is now read-only.

可不可以实时获取音频文件 #336

Open
k1195453766 opened this issue Jul 29, 2019 · 9 comments
Open

可不可以实时获取音频文件 #336

k1195453766 opened this issue Jul 29, 2019 · 9 comments

Comments

@k1195453766
Copy link

在AudioRecorder.onProgress 中data中没有实时返回音频路径,我像知道能不能实时获取音频路径

There is no real-time return audio path. I want to know if I can get the audio path in real time during recording. Thank you.

@aJIEw
Copy link

aJIEw commented Aug 20, 2019

onProgress only works on iOS, you can set and save the audio path before recording started

@k1195453766
Copy link
Author

I want to get audio files in real time during recording, which is not possible on Android yet.

@aJIEw
Copy link

aJIEw commented Aug 21, 2019

ok, but I still don't get it why you want to get the file path while recording when you can get it in advance? maybe some explain?

@ityuany
Copy link

ityuany commented Aug 28, 2019

@aJIEw
Because I want to get the stream information of the audio in real time, prevent the user's app process from suddenly dying during the half of the recording process, resulting in the need to re-record again.

@aJIEw
Copy link

aJIEw commented Aug 28, 2019

well, in that case, you can call stopRecording on app exit, it seems that this lib doesn't support long-time running in the background(at least for android), so maybe better not use it for that purpose.

@ityuany
Copy link

ityuany commented Aug 28, 2019

@aJIEw
My app may have unexpectedly caused an exit and can no longer call the specified function.

@k1195453766
Copy link
Author

@aJIEw
我的目的是要实现随时获取音频并且实时的对该音频打分,如果录音完再进行打分的话,会有很长时间的延迟,录音越长,等待时间越长
My goal is to get audio at any time and score the audio in real time. If the audio is recorded and scored again, there will be a long delay. The longer the recording is, the longer the waiting time will be.

@aJIEw
Copy link

aJIEw commented Aug 29, 2019

@aJIEw
我的目的是要实现随时获取音频并且实时的对该音频打分,如果录音完再进行打分的话,会有很长时间的延迟,录音越长,等待时间越长
My goal is to get audio at any time and score the audio in real time. If the audio is recorded and scored again, there will be a long delay. The longer the recording is, the longer the waiting time will be.

I see, what you want is recording and streaming at the same time (not supported by this library), you can try react-native-audio-record, let me know if that helps.

@k1195453766
Copy link
Author

@aJIEw Thank you. That's exactly what I want.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants