# Unable to run whisper small finetune after training

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-run-whisper-small-finetune-after-training%2F128594%3E%5C
**Category:** Beginners\
**Created:** [November 30, 2024, 2:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-run-whisper-small-finetune-after-training%2F128594 "2024-11-30T14:35:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![truefriend2004](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/truefriend2004/32/36741_2.png) [@truefriend2004](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftruefriend2004)%5C
**Post date:** [November 30, 2024, 2:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-run-whisper-small-finetune-after-training%2F128594%2F1 "2024-11-30T14:35:28Z")

</div>

I have fine tuned whisper small for Urdu using [this](https://huggingface.co/blog/fine-tune-whisper) huggingface post. The original is for Hindi, so basically I just changed “hi” to “ur” and it worked as there is similar amount of data for Urdu available on Mozilla Common Voice.  
Now I wanna run the model locally using this code chunk (again from the above guide):

```auto
from transformers import pipeline
import gradio as gr

pipe = pipeline(model="sanchit-gandhi/whisper-small-hi") # change to "your-username/the-name-you-picked"

def transcribe(audio):
    text = pipe(audio)["text"]
    return text

iface = gr.Interface(
    fn=transcribe, 
    inputs=gr.Audio(source="microphone", type="filepath"), 
    outputs="text",
    title="Whisper Small Hindi",
    description="Realtime demo for Hindi speech recognition using a fine-tuned Whisper small model.",
)

iface.launch()

```

However I am unable to understand how to specifiy the path to my local `checkpoint-5000` folder or another folder where I saved the pre-trained model using `trainer.save_model`. There are many posts online on how to load pre-trained ([like this one](https://stackoverflow.com/questions/71058732/how-to-load-transformers-pipeline-from-folder)). I always get error when using these methods `feature_extractor` not present, or tokenizer or something else (these files are not present neither in `checkpoint-5000` nor in `whisper-small-ur` where I manually save using `trainer.save_model`). Any help will be appreciated.

---

<div class="post-metadata">

**Author:** ![truefriend2004](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/truefriend2004/32/36741_2.png) [@truefriend2004](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftruefriend2004)%5C
**Post date:** [November 30, 2024, 5:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-run-whisper-small-finetune-after-training%2F128594%2F2 "2024-11-30T17:04:28Z")

</div>

Somebody asked it previously and got it solved.

> [@Tokenizer not created when training whisper-small model](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftokenizer-not-created-when-training-whisper-small-model%2F61876%2F4)%3A
>
> This is what helped me. Although this command is found in the [Google Colab](https://colab.research.google.com/github/sanchit-gandhi/notebooks/blob/main/fine_tune_whisper.ipynb#scrollTo=-2zQwMfEOBJq) linked in the blog, I believe the author accidentally skipped it in the blog itself. Before starting the training, we need to save the processor which is not trainable and hence does not change during training. processor.save\_pretrained(training\_args.output\_dir) This will add the necessary files for the tokenizer and whether you use the model locally or push it to hub, it will have all the necessary files.

The following line should follow before trainer.train() to save the configuration  
`processor.save_pretrained(training_args.output_dir)`  
One wonders why the original post has not been updated with the missing info?!

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [November 30, 2024, 5:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-run-whisper-small-finetune-after-training%2F128594%2F3 "2024-11-30T17:28:45Z")

</div>

If anyone doesn’t raise an issue on the Hugging Face github, the author won’t notice it and it won’t get fixed…😭

> **[Hugging Face](https://github.com/huggingface)**
>
> The AI community building the future. Hugging Face has 265 repositories available. Follow their code on GitHub.
