Run OpenAI Whisper in real time on a Raspberry Pi 4 on-device (Uses the C++ model)

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 26

  • @ryoung17
    @ryoung17 10 месяцев назад +1

    Fantastic! This video helped me get Whisper up and running on my Pi 4B as well. Any luck with the conversion of the model to TensorFlow Lite format? Keep up the great work!

  • @GabrielKapellmann
    @GabrielKapellmann 8 месяцев назад +1

    Great video. Do you know if I use a Jetson nano, could I use the GPU instead of the CPUs?

  • @CristianLukaszewicz
    @CristianLukaszewicz Год назад +4

    Hi, great video, but i'm getting a "fatal error: immintrin.h: Missing file or directory", i searched everywhere but all i saw was it's an architecture problem. Do you know what could be?

    • @samwechsler
      @samwechsler  Год назад

      I remember seeing that somewhere. I think it was when I tried to run the 32 bit version of the Raspbian OS. Make sure you use the latest Rasbian Imager and 64 bit OS

    • @carolenejoy9562
      @carolenejoy9562 11 месяцев назад

      I got this same issue. I used the 64 bit OS. Is your problem solved?

  • @reddit-_-Shorts
    @reddit-_-Shorts Год назад +1

    is it possible to transcribe an audio file and get the text with corresponding timestamps like in the pytorch model?

    • @contractorwolf
      @contractorwolf Год назад

      yeah thats what it does by default, but you can turn those off if you need to

  • @Hazar-bt6nf
    @Hazar-bt6nf 6 месяцев назад

    Can whisper run on Raspberry pi4 B in pyhthon version?

  • @mirakekkle9476
    @mirakekkle9476 11 месяцев назад

    2 Questions:
    1) How do I stop recording? I want to make a alexa type chatGPT type speaker. The user presses the button to start the text to speech and presses again to end it.
    2) How do I output the transcript to a txt file?
    Thanks

    • @samwechsler
      @samwechsler  10 месяцев назад +1

      1) There are a few ways to start and stop via button press (probably more than I mention below). Method A) Whisper is always running. The button press starts or stops the data transmission. The C++ program would be modified, recompiled, and run, looking for the button press input. Method B) Use a bash script. When the button is pressed and signal edge is detected run the whisper program. To stop it via bash I'm not sure, but there must be a way. In the terminal I think it is CNTRL+C. 2) -f will record to a file. Check out around the 11 minute mark here: ruclips.net/video/qgF4_moXcYQ/видео.html

  • @terrakamino
    @terrakamino Год назад

    Sam, this is awesome!!!! Incredible!!!! I am going to try this. Is this C++ version the only one that works on Raspberry Pi?

    • @samwechsler
      @samwechsler  Год назад

      Alex, good question. I don't know if any has been able to get the original PyTorch model running on a Raspberry Pi. Maybe you can be the first. That would be very exciting. github.com/openai/whisper

    • @MrHumbleOne
      @MrHumbleOne Год назад

      I tried other version but getting PyTorch to work on python is not very easy. I will try this C++ version

  • @hungnguyenhuu7185
    @hungnguyenhuu7185 6 месяцев назад

    Great video. Can it run on ARM Cortex-A76?

    • @samwechsler
      @samwechsler  4 месяца назад

      Yes, it will run on the Raspberry Pi 5. The Raspberry Pi 5 uses a 64-bit 2.4 GHz quad-core ARM Cortex-A76

  • @yantaosong
    @yantaosong Год назад

    cool, thanks sam for your share, just support englisht or other languages ?

    • @samwechsler
      @samwechsler  Год назад

      It looks like it supports other languages too. I haven't tried that though. Links here: github.com/ggerganov/whisper.cpp/tree/master/models

  • @Therifleartist
    @Therifleartist Год назад

    Hi, what is version Pi4 are you using? Is there a minimum memory requirement? I'm getting a 'Illegal instruction (core dumped)' when I try this on a 1GB Pi4.

    • @samwechsler
      @samwechsler  Год назад

      When does the error happen? Install or downloading the model? I'm assuming your using the tiny model. My Pi had 4 GB RAM. Info about memory is here: github.com/ggerganov/whisper.cpp

    • @samwechsler
      @samwechsler  Год назад

      I can get it to run on the Pi 4 with 1GB RAM, but 4GB is WAY better. With 1GB the memory will lock it up often.

  • @nguyenrichdad5151
    @nguyenrichdad5151 Год назад

    Hi, It works with raspberry pi 3B or 3B+ too?

    • @samwechsler
      @samwechsler  Год назад

      I've only tried with the Pi 4 with 4GB RAM. You can try with 3B and let us know if it works.

    • @nguyenrichdad5151
      @nguyenrichdad5151 Год назад

      @@samwechsler I tried with 3B but It didn't recognize what i said. It's seem be caused by the microphone, right?

    • @Hazar-bt6nf
      @Hazar-bt6nf 6 месяцев назад

      What if I write Python?

  • @contractorwolf
    @contractorwolf Год назад

    I used the Coral Accelerator with my TF model on the Raspberry Pi in this video:
    ruclips.net/video/34NSZA2Ne5A/видео.html

    • @samwechsler
      @samwechsler  Год назад

      @contractorwolf - very nice stuff. That's cool that you built your own model.