Build a Sentiment-Aware Voice Assistant with On-Device LLMs
Introduction
Understand voice sentiment analysis for on-device AI
Set up your environment
Build the voice-to-LLM pipeline
Train the voice sentiment classification model
Convert and quantize the model
Integrate the voice sentiment classification model
Next Steps
Build a Sentiment-Aware Voice Assistant with On-Device LLMs
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.
Record audio and confirm that the interface displays both a transcript and the local LLM response. This verifies that Whisper transcription and the LLM request are working.
Yes. Install
ffmpeg before running the transcription step because Whisper needs it to decode audio.After training, save the HuBERT model and its feature extractor in
models/hubert_vsa_ravdess. Train it on the selected RAVDESS classes: neutral, happy, and angry.Add the predicted sentiment to the prompt in
handle_audio before sending it to the local LLM. To verify the integration, run app.py and confirm that you see a transcript, predicted sentiment, and LLM response.Set
ONNX_PATH to models/hubert_vsa_ravdess_onnx/hubert_vsa_ravdess_int8.onnx. The final app loads this quantized model with the CPU execution provider.