Clone the repository and enter the project directory:
git clone https://github.com/Pamir-AI/distiller-cm5-sdk.git
cd distiller-cm5-sdkRun the following script to automatically download all required models and build the package:
📝 If you're using a virtual environment, make sure to activate it first:
python3 -m venv .venv source .venv/bin/activateThen, install the required
buildmodule:pip install build
chmod +x build.sh
./build.sh # Build without Whisper (Recommended)
./build.sh --whisper # Build with Whisper model includedIf you prefer manual control, download the following models:
Place all files in:
src/distiller_cm5_sdk/whisper/models/faster-distil-whisper-small.en/
Place all files in:
src/distiller_cm5_sdk/parakeet/models/
Download to:
src/distiller_cm5_sdk/piper/
Then extract and clean up:
cd src/distiller_cm5_sdk/piper
tar -xvf piper_arm64.tar.gz
rm piper_arm64.tar.gzPlace in:
src/distiller_cm5_sdk/piper/models/
If not using build.sh, manually build:
python -m build🔧 Make sure
portaudio19-devis installed forpyaudiosupport:sudo apt install portaudio19-dev
After building, install the generated wheel file:
pip install ./dist/distiller_cm5-sdk-0.1.0-py3-none-any.whl✅ You should now be able to import and use
distiller_cm5_sdkin your Python code.
from distiller_cm5_sdk import whisper
whisper_instance = whisper.Whisper()
for text in whisper_instance.transcribe("speech.wav"):
print(text)from distiller_cm5_sdk import parakeet
parakeet_instance = parakeet.Parakeet(vad_silence_duration=0.5)
for text in parakeet_instance.auto_record_and_transcribe():
print(f"Transcribed: {text}")from distiller_cm5_sdk import piper
piper_instance = piper.Piper()
text = "How are you?"
# Option 1: Get path to generated WAV file
wav_path = piper_instance.get_wav_file_path(text)
# Option 2: Directly speak with real-time streaming
piper_instance.speak_stream(text, volume=30)- Whisper model is optional and will only be downloaded if
--whisperis passed tobuild.sh.