Skip to content

Doraemonwei/distiller-cm5-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

distiller-cm5-sdk


📁 Project Setup

Clone the repository and enter the project directory:

git clone https://github.com/Pamir-AI/distiller-cm5-sdk.git
cd distiller-cm5-sdk

⚙️ Model Download & Build (Recommended)

Run 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/activate

Then, install the required build module:

pip install build
chmod +x build.sh
./build.sh                # Build without Whisper (Recommended)
./build.sh --whisper      # Build with Whisper model included

🛠️ Manual Model Download & Build (Optional)

If you prefer manual control, download the following models:

🔉 Whisper Model (Optional)

Place all files in: src/distiller_cm5_sdk/whisper/models/faster-distil-whisper-small.en/

🧠 Parakeet Model (ASR + VAD)

Place all files in: src/distiller_cm5_sdk/parakeet/models/

🗣️ Piper Model (TTS)

1. Executable

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.gz

2. Voice Model Files

Place in: src/distiller_cm5_sdk/piper/models/


🔨 Build

If not using build.sh, manually build:

python -m build

🔧 Make sure portaudio19-dev is installed for pyaudio support:

sudo apt install portaudio19-dev

📥 Install the Package

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_sdk in your Python code.

🚀 Usage Examples

🔊 ASR with Whisper

from distiller_cm5_sdk import whisper

whisper_instance = whisper.Whisper()
for text in whisper_instance.transcribe("speech.wav"):
    print(text)

🧠 ASR + VAD with Parakeet

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}")

🗣️ TTS with Piper

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)

📎 Notes

  • Whisper model is optional and will only be downloaded if --whisper is passed to build.sh.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Python 94.4%
  • Shell 5.6%