Adding AI-powered voice control to cooking apps doesn’t have to be complicated. With Rhino Speech-to-Intent, you can enable hands-free recipe navigation and timer control in just a few lines of code, without heavy data pipelines or complex infrastructure.
In this tutorial, we'll build a Python-based hands-free cooking workflow powered by Rhino Speech-to-Intent. We will create a responsive, and low-latency workflow where users can follow recipes and track steps with their voice while cooking.
Why On-Device Speech-to-Intent is Better for Cooking Apps
Traditional cloud-based solutions use a speech-to-text pipeline, transcribing everything you say. This voice controlled cooking app uses a more efficient, modern approach on the device: end-to-end intent inference from speech.
Instead of transcribing audio, Rhino Speech-to-Intent directly understands what you mean and maps your speech to a pre-defined set of intents. Given an audio input, Rhino makes a structured decision: which intent was spoken, and which parameters (or "slots") are included. It can understand voice commands like:
With Rhino Speech-to-Intent, these commands are defined in a context file. The context lists the intents (e.g., next_step, repeat_step, set_timer) and the expected phrases for each intent.
Step 1: Define Cooking Intents for Hands-Free Recipe Navigation
- To train a custom Speech-to-Intent model, create an account on the Picovoice Console.
- Create an empty Rhino Speech-to-Intent context.
- Click the "Import YAML" button in the top-right corner of the Console. Paste the YAML provided below to add the intents and expressions for the voice controlled cooking app.
- Use the microphone button to test the context in-browser. This will save and build the context.
- Download the context file for your platform.
YAML Context file for the Voice Controlled Cooking App:
For more details on how to build your context, refer to the Rhino Syntax Cheat Sheet.
Step 2: Set Up Your Python Environment for Voice Control
Install the Rhino Speech-to-Intent Python SDK pvrhino to run inference, and the Picovoice Python Recorder library pvrecorder to capture microphone audio.
Step 3: Capture and Process Voice Commands in Real Time in Python
Now let's run Rhino Speech-to-Intent with live audio and process voice commands in real time.
Initialize Rhino Speech-to-Intent and Set up Microphone Input
The main function initializes Rhino with the ACCESS_KEY and context file, then sets up the audio recorder to capture microphone input.
Process Voice Commands in Real Time
Rhino continuously processes audio frames from the microphone. When a voice command is finalized, the cooking guide displays the recognized intent and executes the corresponding action.
Map Recognized Voice Commands to Cooking App Actions
Once Rhino finalizes an utterance, it produces an inference containing the recognized intent and slots. The process_inference function displays what was understood and triggers the corresponding action in the recipe app.
The handle_cooking_action function maps Rhino's recognized intents and their slots into recipe-specific actions.
Complete Python Script for Hands-Free Cooking App Navigation
Here's the complete Python script integrating all the components above:
Run Your Cooking App with Voice Commands
Run the script from your terminal with the following commands. Copy your AccessKey from the Picovoice Console and replace the placeholder values with your actual ACCESS_KEY and CONTEXT_FILE_PATH. The AUDIO_DEVICE_INDEX is optional and will use the default microphone if not specified.
The cooking app is now ready and listening for your voice commands.
Unlock New Voice Features for Cooking Apps
With Rhino Speech-to-Intent, you can extend beyond timers and recipe navigation to:
- Shopping List Management: Add missing ingredients directly to a list or send them to a companion app.
- Nutritional Guidance: Query calories, portions, or dietary substitutions while preparing meals.
These features can turn recipe apps into interactive, hands-free cooking companions that are personalized, responsive and private.
Interested in adding more voice-powered features? Add Porcupine Wake Word and Orca Text-to-Speech to create a full kitchen assistant responding to users.
Start Adding Voice to Your Cooking App with Picovoice
Ready to add voice control to your cooking app? The Picovoice Console is the best place to start. You can design your custom intent model for free in just a few clicks.
Start Free






