DEV Community

Cover image for Day 8: Making Cool Raspberry Pi Projects even Cooler with Voice AI (3/4)
Dilek Karasoy for Picovoice

Posted on

Day 8: Making Cool Raspberry Pi Projects even Cooler with Voice AI (3/4)

Today is the day for on-device audio transcription for Raspberry Pi

SDKs
.NET
C
Go language
Java
Node.js
Python
Rust

Let's use C!
Compatibility
C99-compatible compiler
Requirements
CMake version 3.13 or higher
Picovoice AccessKey
Build
Run this from the root of the repository:

cmake -S demo/c/ -B demo/c/build
cmake --build demo/c/build
Enter fullscreen mode Exit fullscreen mode

Prints the usage:

usage: -a ACCESS_KEY -l LIBRARY_PATH -m MODEL_PATH [-d] [-v] audio_path0 audio_path1 
Enter fullscreen mode Exit fullscreen mode

Replace ${ACCESS_KEY} with yours and ${AUDIO_PATH} with the path to an audio file you want to transcribe.

  • Use the -d flag to disable automatic punctuation
  • Use the -v flag to enable the printing of word metadata

This tutorial is intended for Raspberry Pi 4. If you're looking for Raspberry Pi 3 or Raspberry Pi 400 or Raspberry Pi 4 (64-bit) check out Leopard C Demos on GitHub

./demo/c/build/leopard_demo \
-a ${ACCESS_KEY} \
-m lib/common/leopard_params.pv \
-l lib/raspberry-pi/cortex-a72/libpv_leopard.so \
${AUDIO_PATH}
Enter fullscreen mode Exit fullscreen mode

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay