RealtimeSTT
RealtimeSTT copied to clipboard
listening to m3u8 / rtmp audio
is it possible to do this?
I also have a use case here, to analyze the audio coming from these sources. Is it possible to have a real-time live stream feed (such as RTMP) as an input? How would one go about using a remote feed as the input?
Just use ffmpeg to pipe your audio.
I am working on a bot to transcribe/translate youtube live stream in realtime.
I use yt-dlp to fetch m3u8 audio chunk and pass it to ffmpeg to process audio into 16-bit PCM chunk, and finally pass the processed chunk to the RealtimeSTT server.
Ends up something like this:
python fetch.py [URL] | ffmpeg -f mpegts -i - -c:a pcm_s16le -ac 1 -ar 16000 -f wav - | python send_pcm_to_websocket.py
thankyou, I should close this, I already found reliable way to do this