-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSI function for transcribe audio buffer #52
Comments
Any progress on this one? :) |
Hi @jhen0409 , After implementing non-live transcription in my audio playground, I'd like to discuss approaches for live transcription integration between expo-audio-stream and whisper.rn. I see two main paths:
Questions:
I believe the native integration path would provide better performance for real-time use cases, but I'd appreciate your thoughts on this approach. Happy to contribute PRs once we align on the best path forward. Looking forward to your feedback! |
I'd like to extend current transcribeRealtime({
/** [NEW option] Choose audio source (custom: put by yourself in JS or native side */
source: 'built-in' | 'custom',
// ...
}): Promise<{
/** Stop the realtime transcribe */
stop: () => Promise<void>
/** Subscribe to realtime transcribe events */
subscribe: (callback: (event: TranscribeRealtimeEvent) => void) => void
/** [NEW method] Put audio buffer (Buffer or base64 encoded string) for `custom` source */
pushAudioDataChunk: (data) => void
}> The Also, we can expose a static method for put audio data to a realtime-transcription job in the native side, so that can use by a custom audio stream native module. For the |
Provide JSI function for transcribe audio buffer, so we can use library like react-native-audio-pcm-stream or from another source, and we can manage recorded audio samples on JS without writing platform specific code.
Compare to native bridge, JSI can convert buffer from JS in high performance.
The text was updated successfully, but these errors were encountered: