aarnphm / whispercpp

Pybind11 bindings for Whisper.cpp
Apache License 2.0
324 stars 63 forks source link

feat: async streaming APIs #44

Open aarnphm opened 1 year ago

aarnphm commented 1 year ago

Feature request

Currently, stream_transcribe is blocking, which should be async instead.

Motivation

No response

Other

No response

eschmidbauer commented 1 year ago

Would it be possible to implement this so realtime data can be sent from any source (e.g. websockets, reading large file, etc...)

Stonelinks commented 1 year ago

yeah ran into this as well -

from what i'm able to tell this PR introduced streaming: https://github.com/aarnphm/whispercpp/pull/22

seems like this PR changed self._transcript from a generator to a list / iterator: https://github.com/aarnphm/whispercpp/pull/66... i haven't tried but perhaps reverting the commit back to a generator would get us back into a working state?

definitely eagerly awaiting this change! would love to stream asynchronously straight into an LLM or something. thanks for what seems like an awesome library!

aarnphm commented 1 year ago

I haven't had the bandwidth yet. #22 is pretty experimental. What I want to support eventually is SSE (or eventually websocket)

libratiger commented 1 year ago

Would it be possible to implement this so realtime data can be sent from any source (e.g. websockets, reading large file, etc...)

glad to see to support from websockets source