Implement a voice translation pipeline on Apple silicon
Introduction
Set up the voice translation project
Transcribe microphone audio with Sherpa-ONNX
Translate text with Gemma 4 E2B
Synthesize translated speech with Supertonic 3
Build the voice translator with Gradio
Validate the voice translation pipeline
Next Steps
Implement a voice translation pipeline on Apple silicon
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Run
python stt.py to record five seconds of audio. Confirm that the transcript contains the words you spoke. If it’s empty, check the selected microphone and your terminal’s permission.Run
python translate.py Spanish and enter a short English sentence at the prompt. You should see the Spanish translation appear as Gemma generates it.Run
python tts.py Spanish and paste a Spanish sentence to synthesize and play speech. If you don’t hear audio, confirm that macOS has selected your intended output device.Make sure
stt.py, translate.py, tts.py, and languages.py are in your project directory. Then create app.py to connect them to a local Gradio interface.Yes. Select another language listed in
LANGUAGES. To add a new supported target language, update LANGUAGES in languages.py. For a non-English source language, you need a different speech recognition model and configuration.