Upload preprocessor_config.json

#1
by mobi - opened

Uploaded the preprocessor_config.json file from "openai/preprocessor_config.json" to make this copatible with pipeline.

Hi, thanks for your proposal,
After upload preprocessor_config.json, we can load processor using

processor = WhisperProcessor.from_pretrained("spow12/whisper-medium-zeroth_korean", language="ko", task="transcribe")

Right?

TL;DR: Please ignore, it did not work as expected.

Actually my plan was to make it work like:

from transformers import pipeline
pipe = pipeline(task = "automatic-speech-recognition", model = "spow12/whisper-medium-zeroth_korean")
transcript = pipe(audio_file)

However, I am still note able to make it work. I have tried cloning your model and tried it already but it was not successful.

For now, it is possible to make it work as follows without doing any changes :

from transformers import pipeline
from transformers import WhisperTokenizer,  WhisperFeatureExtractor
generator = pipeline('automatic-speech-recognition',
                    model='spow12/whisper-medium-zeroth_korean',
                    tokenizer=WhisperTokenizer.from_pretrained("openai/whisper-medium", language="ko", task="transcribe"),
                    feature_extractor=WhisperFeatureExtractor.from_pretrained("openai/whisper-medium", language="ko", task="transcribe"),
                    device=0 if torch.cuda.is_available() else "cpu",
                     )

For now, I have cloned your repository to my space and once I get it to work, I will request to merge again.

mobi changed pull request status to closed

Sign up or log in to comment