Skip to content
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

Possible to handle recording in real-time? #94

Open
nodew opened this issue Jan 26, 2024 · 1 comment
Open

Possible to handle recording in real-time? #94

nodew opened this issue Jan 26, 2024 · 1 comment

Comments

@nodew
Copy link

nodew commented Jan 26, 2024

Currently, the AudioSource is only available after the recorder StopAsync. It doesn't work for the case if I want to handle the recording data in real-time.

I'm wonder if it's possible to add the similar API as the following to the AudioRecorder to support task like sending the recording to backend in real-time.

await audioRecorder.StartAsync();
audioRecorder.OnDataBytes((bytes, count) => {
    // handler.Handle(bytes, count)
})
@radrad
Copy link

radrad commented May 29, 2024

If we use Linear PCM (LPCM), which doesn't include headers and allows any segment of the audio to be played independently, we can send the audio chunks to the backend. With a method for silence detection, we could split the real-time audio into chunks and send these to OpenAI's Whisper for transcription. This approach could enable near real-time transcription display on the frontend, store the transcription, and perform summarization or other AI tasks.

I'm interested in finding out how to send the minimum amount of bytes with sufficient quality to a cloud-based Whisper deployment for transcription. This transcription could be saved as metadata for the audio recording, and the audio itself backed up to a cloud location. Additionally, generating .srt files with timestamps would allow users to jump to specific audio segments corresponding to the subtitles.

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

No branches or pull requests

2 participants