A multimodal voice assistant with web search, vision, and image generation.
Project description
V1.8 Speech Agent
V1.8 is an experimental voice-first AI assistant. It listens to spoken prompts, responds out loud, can launch apps on macOS, can search the web for current context, can inspect images from a webcam, and can generate images when the user asks for a visual result.
What It Does
This project combines several assistant behaviors into one loop:
- Speech-to-text using Whisper through
speech_recognition - Text-to-speech using
edge-tts - App launching on macOS for commands such as
open Safari - Web query simplification and search retrieval through DDGS
- Webcam-based vision analysis for appearance or environment questions
- Image generation with Stable Diffusion
- Terminal-friendly output formatting with
rich
Who This Is For
This repository is intended for developers and hobbyists who want to explore a local voice assistant workflow. It is especially useful if you are interested in:
- voice interfaces
- multimodal AI interactions
- local automation on macOS
- image generation pipelines
- combining web search, vision, and speech in a single assistant
Requirements
- macOS
- Python 3.11 or newer is recommended
- A microphone with system permission enabled
- A camera with system permission enabled if you want vision features
- Ollama installed and available on the machine running the script
chafainstalled if you want terminal previews for generated images- Hardware that can run the configured Stable Diffusion pipeline on
mps, or code changes to target a different device
Python Dependencies
The script uses the following Python packages:
torchollamaspeech_recognitionedge_ttsddgsopencv-pythonrichdiffusersterm-image
Installation
-
Clone the repository and open the
V1.8folder. -
Create a virtual environment:
python3 -m venv venv
source venv/bin/activate
- Install the dependencies:
pip install torch ollama SpeechRecognition edge-tts ddgs opencv-python rich diffusers term-image
- Make sure Ollama can access the models referenced in
main.py.
Usage
Run the assistant with:
python main.py
On startup, the program asks you to choose a voice:
Maleselectsen-US-SteffanNeural- Any other input selects
en-US-AvaNeural
Then the assistant will:
- Prompt you to speak
- Transcribe your speech
- Decide whether the request is for app launching, image generation, vision analysis, or a normal answer
- Speak the response back to you
- Ask whether you want to continue the conversation
How It Works
App Launching
If the transcription includes open, the assistant tries to find a matching application on macOS. If no local app is found, it falls back to opening a website based on the target name.
Web Answers
For general questions, the assistant first simplifies the query and fetches recent search results. The response model can use those results when the request is about news, current events, or recent information.
Vision Mode
If the prompt seems to require visual context, the assistant captures a frame from the webcam, saves it locally, and sends it to a vision-capable model for analysis.
Image Generation
If the prompt is recognized as an image request, the assistant converts it into a short image prompt, generates an image with Stable Diffusion, saves the result as generated_image.png, and displays it in the terminal.
Limitations
- The current implementation is macOS-focused.
- The assistant depends on several external models and services.
- The Stable Diffusion pipeline is loaded at startup, which may be slow on lower-powered machines.
- The current code stores generated and captured images in the working directory.
- The app-launching behavior is intentionally simple and may not match every app name perfectly.
Future Opportunities
This version leaves room for several improvements:
- Add cross-platform support beyond macOS
- Make the model names and device selection configurable through environment variables or a config file
- Add a proper command parser for app launching instead of relying on keyword matching
- Add a conversation history file or database
- Add streaming responses so users hear partial answers sooner
- Add a richer UI for desktop or web use
- Add safer image handling and cleanup for generated files
- Add a setup script or dependency file for easier installation
Troubleshooting
- If microphone input fails, check system permissions and verify
speech_recognitionis installed correctly. - If camera capture fails, check camera permissions and confirm OpenCV can access the device.
- If image generation fails, verify that your hardware supports the configured device target or update the pipeline configuration.
- If terminal image preview fails, install
chafaand confirm it is available in your PATH.
License
No license has been added yet. Add one before publishing or distributing the project widely.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file churovoice-0.1.0.tar.gz.
File metadata
- Download URL: churovoice-0.1.0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dd7c4715c0c374bd0a566b6f2b15522bc304ea32f556381c355dac950d681bf
|
|
| MD5 |
0f17cd04b4213182f9c711286c7618f8
|
|
| BLAKE2b-256 |
072c5e6b8ecb820e565940edb76d2ff5b7e1918ded530baac3d860df47fdebb7
|
File details
Details for the file churovoice-0.1.0-py3-none-any.whl.
File metadata
- Download URL: churovoice-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09e4e1a7b091aa0fe7a493f5f6f366b9a801d29678c754312881cc50009de3d1
|
|
| MD5 |
699d07dacc560c2466d99d6ac305c52a
|
|
| BLAKE2b-256 |
bf2d5b0d03cb85346534e2ae681f72e1c1ad61c15f260c8626a4fa7dc64426e7
|