A voice-first conversation application built with Tauri and React that enables natural audio conversations with AI. This app provides a seamless push-to-talk experience for macOS users.
- Voice-First Interface: Push-to-talk audio recording with real-time waveform visualization
- Speech-to-Text: Powered by OpenAI's Whisper model for accurate transcription
- AI Conversations: Integration with Ollama for intelligent responses using Gemma3N model
- Text-to-Speech: macOS native TTS for natural voice responses
- Conversation History: Persistent storage of all conversations and messages
- Modern UI: Beautiful gradient interface with responsive design
- Permission Management: Proper microphone permission handling for macOS
- React 19 with TypeScript
- Tailwind CSS for styling
- Vite for build tooling
- Tauri API for native integration
- Rust with Tauri 2.0
- Whisper-rs for speech recognition
- Ollama for AI chat (Gemma3N model)
- SQLite for data persistence
- cpal for audio processing
- macOS native TTS for speech synthesis
Before running this application, ensure you have:
- Node.js (v18 or higher)
- pnpm package manager
- Rust toolchain (latest stable)
- Ollama installed and running
- macOS (for native TTS and permissions)
git clone https://github.com/Dhruv2mars/pR-t-04.git
cd pR-t-04/audio-chat-apppnpm installInstall Ollama and run the required model:
# Install Ollama (if not already installed)
curl -fsSL https://ollama.ai/install.sh | sh
# Pull and run the Gemma3N model
ollama pull gemma3n:latest
ollama run gemma3n:latestDownload the Whisper model for speech recognition:
# Create models directory
mkdir -p src-tauri/models
# Download the Whisper model (you'll need to download this manually)
# Place ggml-base.en.bin in src-tauri/models/# Development mode
pnpm dev
# Build for production
pnpm build- Launch the App: Start the application and grant microphone permissions when prompted
- Start Conversation: Click and hold the microphone button to record your message
- Release to Send: Release the button to send your audio message
- Listen to Response: The AI will respond with synthesized speech
- View History: Access conversation history from the sidebar
audio-chat-app/
├── src/ # React frontend
│ ├── components/ # React components
│ │ ├── VoiceChat.tsx # Main voice interface
│ │ ├── HistorySidebar.tsx
│ │ ├── StatusBar.tsx
│ │ ├── Waveform.tsx
│ │ └── MicrophonePermissionModal.tsx
│ ├── App.tsx # Main app component
│ └── main.tsx # Entry point
├── src-tauri/ # Rust backend
│ ├── src/
│ │ ├── main.rs # Tauri app setup
│ │ ├── asr.rs # Speech recognition
│ │ ├── tts.rs # Text-to-speech
│ │ ├── ollama.rs # AI chat integration
│ │ ├── db.rs # Database operations
│ │ ├── microphone.rs # Microphone handling
│ │ └── audio_processing.rs
│ └── Cargo.toml # Rust dependencies
└── package.json # Node.js dependencies
The app uses default configurations, but you can customize:
- Ollama URL: Defaults to
http://localhost:11434 - Whisper Model: Uses
ggml-base.en.bin - TTS: Uses macOS native
saycommand
Conversations are stored in SQLite database located in the app's data directory.
If microphone access is denied:
- Go to System Preferences > Security & Privacy > Privacy > Microphone
- Add the app to the list of allowed applications
- Restart the application
- Ensure Ollama is running:
ollama run gemma3n:latest - Check if port 11434 is accessible
- Verify the model is downloaded:
ollama list
- Ensure
ggml-base.en.binis insrc-tauri/models/ - Check file permissions and size
- Verify the model file is not corrupted
- Check microphone input levels
- Ensure recording duration is at least 0.5 seconds
- Verify audio format compatibility
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for the Whisper speech recognition model
- Ollama for the local AI inference
- Tauri for the cross-platform framework
- React and Rust communities
For issues and questions:
- Create an issue on GitHub
- Check the troubleshooting section above
- Ensure all prerequisites are met
Note: This application requires macOS for optimal functionality due to native TTS and permission handling.