-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[Feature] recognize data coming via pipe stream #65
Comments
I was thinking something similar. However in my case it was to avoid the anemic performance of the Raspberry Pi 0 CPU. I figured if the audio could be recorded on the Raspberry Pi microphone, then transmitted to a desktop/remote CPU through ssh or a PulseAudio server. It would allow near realtime transcription on devices that otherwise would be unable to run the model. I am not an expert in C++, but here is what I understand so far. g_dev_id_in == is the microphone's ID Could SDL_DequeueAudio(g_dev_id_in) be replaced with snippets of the .wav sample mentioned by @abelbabel. Thank you for your time and thank you for the incredible model. It is amazing how quickly and accurately it runs on an entry level laptop |
Sorry, this does not work for me. For example when piping
whereas when reading it the old way, I get
|
@abelbabel |
Does this work with continuous data from pipe for you too? At my site it seems to "wait" forever ... For example: |
Nope - the current implementation waits for the stream from stdin to end before starting to process. |
Hi, I still want to emphasize the utility of a more general approach via pipe. Think of a inference-machine (with proper hardware) that should be used remotely by other processes / users. With the requested feature you could do something like:
(piping your local audio-data - which also can only reside on your local machine - to the recognition-program and getting the result) or you could even process the result further on your local machine like
(with the more general approach you won't need a separate script for bbc-world-service-livestream and other streams and so on ...) I would recommend to re-open this issue as it is not solved (in the general way it was meant). Regards Edit: After re-reading the complete history of this issue, I saw that it seems pretty much what @psych0v0yager will achieve. And that it already might work currently, but that processing while not received the whole data-stream would still be a better way than wait for the stream-content to be transferred completely. |
A way to get stream to read PCM data from stdin or a pipe would be greatly appreciated. |
Hi,
it would be great to have a simple app that takes data from pipe and runs recognition on it ... similar to stream.cpp, but instead taking data from audio device, taking it from pipe ...
Could also be an addition to the main-example, so that you can use it like this:
cat samples/jfk.wav | ./main -m models/ggml-medium.bin -f -
Here something similar is done with vosk and python. (ffmpeg-pre-processing could be something people can do on their own before filling the pipe and not part of the app ...)
Kind regards,
abelbabel
The text was updated successfully, but these errors were encountered: