CASP supports multimedia features such as audio recording & playback, voice capture, text to speech and speech to text conversion etc. This example project demonstrates how to generate text from a narrated voice using CASP on supported targets such as desktop computers and single board computers (Raspberry Pi, Arduino Uno Q etc.).
Pre-Requisites
- Any CASP supported desktop or single board computer.
- A micro-phone connected to the target and configured as default audio input device in the operating system
- CASP software is installed.
- BSP of the target. If target supporting CASP remote build (such as SBCs) are used, ensure remote build tool chain is installed on the target. For further details refer remote build documentation.
- The project files are located at CASP installed directory ‘CASP/support/examples/multimedia/04_speech_to_text’. These are also available for download at this link.
Connection Diagram
A micro-phone is required to be connected to the target audio input port and configured as default audio input device in the operating system to run this example.

Procedure

- Start CASP and load the project.
- The project model consists of audio recorder block connected to a push button switch at its input port to trigger recording and subsequently speech to text conversion process. The output of the audio recorder is connected to speech to text block that generates text output from recorded speech. The output text is displayed through ‘out_text’ block.
- The speech to text block in the model requires ‘whisper.cpp’ program to be installed and functioning. It can be downloaded and installed from whisper.cpp developer webpage: https://github.com/ggml-org/whisper.cpp. Required instructions to download and install the program and its dependencies are mentioned in this webpage.
- Alternatively, CASP tested version of the ‘whisper.cpp’ program is readily available to download at our address: https://aadhuniklabs.com/casp/third_party/multimedia/whisper.cpp_casp.zip. Just download and extract the zip file to your preferred location (preferably to this project’s directory). Within the whisper.cpp folder extract the binary directory based on your platform (whisper-bin-x64.zip for Windows, whisper-bin-ubuntu-x64.tar.gz for x64 Linux platforms and whisper-bin-ubuntu-arm64.tar.gz for ARM64 Linux platforms such as Raspberry Pi, Arduino Uno Q etc.). Please read the ‘readme.txt’ file from whisper.cpp folder for details on how to install and run the program.
- After whisper.cpp is properly installed and functioning, run CASP and load the project. Configure ‘speech_to_text’ block parameters. Please refer block’s help on how to specify parameters related to whisper.cpp executable, model and audio file paths. After the parameters are set click the Run button to build and start simulation.
- In the simulation panel window click and hold push button ‘pb0’, speak a sentence and release the push button. After some seconds you should be able to see your narrated text in the ‘out_text’ window.
