Use I2S microphones on Raspberry Pi 5 and CM5 with Whisper.cpp
Автор: Sam Wechsler
Загружено: 2024-12-17
Просмотров: 6740
Running whisper.cpp on a Raspberry Pi CM5 mounted to a CM4 IO Board using the adafruit MEMS I2S mics (ICS43434 and SPH6045). The CM5 ran the bookworm 64 bit lite operating system. The Raspberry Pi 5 ran the bookworm 64 bit desktop OS.
Running Whisper.cpp on CM5 video: • Raspberry Pi CM4 and CM5 Compatibility Tes...
Whisper on Rasberry Pi 5 video: • OpenAI Whisper C++ on Raspberry Pi 5 - Rea...
Whisper C++ Github: https://github.com/ggerganov/whisper....
Adafruit ICS-43434 I2S mic: https://www.adafruit.com/product/6049...
Adafruit SPH0645 I2S mic: https://www.adafruit.com/product/3421...
Adafruit ICS-43434 setup: https://learn.adafruit.com/adafruit-i...
Adafruit I2S mic Github: https://github.com/adafruit/Adafruit-...
Adafruit comparison of mic types (analog, PDM, I2S) - • The Great Search: I2S microphone @DigiKey ...
ICS43434 - extra notes: https://github.com/mano1979/Pesky-Pro...
Adafruit I2S mic schematics: https://learn.adafruit.com/adafruit-i...
Adafruit ICS43434 GitHub: https://github.com/adafruit/Adafruit-...
Adafruit SPH6045 GitHub: https://github.com/adafruit/Adafruit-...
TO USE THE I2S MICROPHONES:
Navigate to /boot/firmware/config.txt:
cd /boot/firmware/config.txt
OPEN CONFIG.TXT:
Sudo nano config.txt
Add the following line to the bottom of the config.txt file then hit CNTRL+X to save and exit:
dtoverlay=googlevoicehat-soundcard
REBOOT THE RASPBERRY PI:
sudo reboot now
SHOW THE MIC CARD NUMBER (MOST LIKELY 0, 1, or 2):
arecord -l
TEST MIC VOLUME BY TYPING THIS LINE AND TALKING INTO THE MIC(NOTE, put the CARD NUMBER after plughw:, for example plughw:0):
arecord -D plughw:1 -c1 -r 48000 -f S32_LE -t wav -V mono -v file.wav
TO USE WHISPER.CPP WITH ADAFRUIT I2S microphones AFTER DECEMBER 15th, 2024 in Raspberry Pi 5 Bookworm 64 bit Desktop OS:
INSTALL CMAKE:
sudo apt install -y cmake
INSTAL SDL2 library:
sudo apt install libsdl2-dev
CHECK CMAKE VERSION (OPTIONAL)
cmake --version
GO TO YOUR DESIRED INSTALL DIRECTORY, FOR EXAMPLE Desktop
cd Desktop
CLONE THE WHISPER DIRECTORY:
git clone https://github.com/ggerganov/whisper....
GO INTO THE NEW whisper.cpp DIRECTORY:
cd whisper
DOWNLOAD YOUR DESIRED MODEL (FOR example tiny.en, base.en, small.en will saturate the Pi 5 CPU's)
sh ./models/download-ggml-model.sh base.en
BUILD WITH CMAKE
cmake -B build -DWHISPER_SDL2=ON
cmake --build build --config Release
RUN WHISPER.CPP
./build/bin/stream

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: