Comments (6)
Hey @eschmidbauer, @JonathanFly, @Tronic,
I've not tried this, but we'd need to re-work the Flax Whisper Pipeline to accept a generator and return a generator for this to work. It could look something like:
def live_transcription(mic, batch_size, task, return_timestamps):
dataloader = pipeline.preprocess_batch(mic, batch_size=batch_size)
for batch in dataloader:
tokens = pipeline.forward(batch, batch_size=batch_size, task=task, return_timestamps=return_timestamps)
post_processed = pipeline.postprocess([tokens], return_timestamps=return_timestamps)
yield post_processed
And then use the code-snippet from the transformers PR, with the one change:
- for item in pipe(mic):
+ for item in live_transcription(mic, batch_size=16, task="transcribe", return_timestamps=False):
from whisper-jax.
Is anybody working on this? Or somebody could guide me.
from whisper-jax.
Hi- appreciate sharing of this framework, it looks very useful I'm wondering if it's possible to do real-time transcriptions using
from transformers.pipelines.audio_utils import ffmpeg_microphone_live
as detailed in this PR:
I'll try and test this today, you can just feed in segments in a loop to benchmark what it would do when integrated into something that takes live audio. You lose the batching benefits of course, which is the main speedup in whisper-jax. Perhaps you could send overlapping audio segments in a batch, as openai/whisper#608 does, and batch the the audio you are re-running for the updated corrected transcription?
I've never used Jax before. Anyone know if there are performance differences between the various CUDA/CUDNN wheels? I've already got 11.8 and CuDNN 8.8, is there any point to testing the Cuda 12.0 wheel, or is not going to be any faster?
Edit: I'm getting a billion CUDA_ERROR_OUT_OF_MEMORY errors with anything bigger than the small model. I assumed it was broken, it actually still works with the larger models, even though it looks like everything is blowing up.
from whisper-jax.
Streaming in the audio and having low latency transcription output would be nice, yes. A part of the problem is that you don't really know whether you need to listen longer before outputting text (especially so in translate mode). But a way to stream in audio and to stream out text continuously would definitely be nice, more correct and faster than doing it manually in chunks (e.g. by silence detection).
from whisper-jax.
@sanchit-gandhi I'd be happy to help with this. Any pointers?
from whisper-jax.
Perhaps it could be integrated with this https://github.com/ufal/whisper_streaming
from whisper-jax.
Related Issues (20)
- why whisper-jax did not use my GPU? HOT 3
- Rust impl
- Unsuccessful deployment HOT 1
- Coral TPU support HOT 2
- Slower than openai whisper with my gpu HOT 2
- I want to use whisper-at models HOT 1
- Has translate be integrated into transcribe? It returns English but expect Chinese. HOT 3
- Slow post processing HOT 1
- unable to run TPU using current kaggle environment HOT 1
- Large Model causing performance degradation?
- Shape Error when running on GPU HOT 2
- HuggingFace space erroring more often than usual HOT 1
- Transcription issues.
- Punctuation mark
- Confidence score and average log probability on Whisper-JAX
- whisper-large-v3 (in demo code) VS whisper-large-v2 (in kaggle notebook) HOT 1
- Add wrapper for wyoming API
- Kernel always restarting when JIT compiling the forward call on MacBook Pro M3 Max
- Huggingface instance hangs when given Youtube URL with playlist
- JIT compile always crashes the kernel and restarts on google colab TPU. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whisper-jax.