-
Notifications
You must be signed in to change notification settings - Fork 917
WhisperTextStreamer token_ids must be a non-empty array of integers #1273
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
Comments
Hi there 👋
Does this mean the error occurs at construction, or when running the pipeline the first time? There may be an edge-case where the model stops generating, but we attempt to decode (leading to an empty input), which I can try investigate. Do you have sample input or input file that causes this error? One possibility (unlikely) is that it may be the case that you are not awaiting the creation of the pipeline? The error message would be a bit strange in this case though 🤔 - const transcriber = pipeline('automatic-speech-recognition', 'onnx-community/whisper-small', {
+ const transcriber = await pipeline('automatic-speech-recognition', 'onnx-community/whisper-small', {
// ...
const streamer = new WhisperTextStreamer(transcriber.tokenizer, {
// ... |
It reproduces during running the pipeline. video_en.mp4 |
Update: I just checked with 3.5.1 and the problem is still not solved. @xenova, @fs-eire, @guschmue if you want to reproduce, you can try with my fork of Whisper-web and upgrade from 3.3.3 to any newer version. Any audio file and Whisper model will cause the problem. Related issue: xenova/whisper-web#60 |
System Info
@huggingface/transformers 3.4.2
Environment/Platform
Description
I am using AutomaticSpeechRecognitionPipeline (automatic-speech-recognition) and when I try to define new WhisperTextStreamer using tokenizer from this pipeline I get error:
"token_ids must be a non-empty array of integers"
This problem was not happening on versions before 3.4.0
Reproduction
Define pipeline:
And then try to define WhesperTextStreamer:
The text was updated successfully, but these errors were encountered: