Comments (3)
Sure, that should be a simple change. Let me open a PR.
from faster-whisper.
Hi,
This is already possible. The transcribe
method accepts file-like objects so you can wrap your buffer with io.BytesIO
.
For example, the code below reads the audio file into a buffer of bytes which is then passed to transcribe
:
import io
with open("audio.mp3", "rb") as audio_file:
audio_bytes = audio_file.read()
audio_file = io.BytesIO(audio_bytes)
segments, _ = model.transcribe(audio_file)
text = "".join(segment.text for segment in segments)
from faster-whisper.
Would it be possible to add support to pass the waveform as a numpy array directly to transform
without creating a file? whisper
currently allows you to pass the audio file or the audio waveform. For projects which listen to audio in realtime and try to transcribe the audio fast I think the option of being able to pass the waveform directly to transcribe would be really great
from faster-whisper.
Related Issues (20)
- Change Time format from seconds to hour:minutes:seconds HOT 1
- Transcription Segment Length Issue in Converted Whisper Model HOT 3
- run error HOT 1
- Supporting Distil-Whisper HOT 4
- Best strategy for low-latency, high-throuhgput serving in Multi-GPU setups HOT 3
- Module 'os' has no attribute 'add_dll_directory' in Raspberry Pi
- Speculative Decoding HOT 2
- _Warning: Package 'faster _whisper.assets' is absent from the `packages` configuration. HOT 3
- CUDA Initialisation error HOT 3
- Large-v3 model hallucinates, large-v2 doesn't HOT 8
- I can't use language='zh' when I use large-v3 HOT 3
- 2 wavs file with same content generate different result HOT 4
- Problem with audio HOT 5
- How to run HOT 2
- CUDA 12 required? HOT 4
- faster-whisper docker example? HOT 2
- Word-level timestamps are off by some multiplier HOT 1
- Does it support converting to ONNX format models?
- question: client sdk HOT 1
- RuntimeError: CUDA failed with error CUDA driver version is insufficient for CUDA runtime version HOT 2
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 faster-whisper.