Public
Like
groqAudioChat
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
A web-based chat application powered by Groq's LLM API with audio transcription and text-to-speech capabilities.
- Chat with the Llama-3.3-70b-versatile model through Groq API
- Multiple ways to record audio input:
- Hold spacebar to record audio (keyboard shortcut)
- Press Cmd+Space (Mac) or Ctrl+Space (Windows/Linux) to toggle locked recording
- Hold the "Hold to Record" button
- Click the "Lock Recording" button for hands-free recording
- Text-to-speech output for AI responses
- Concise mode for shorter responses
- Toggle TTS on/off
/
├── index.ts # Main entry point
├── handlers/ # API endpoint handlers
│ ├── index.ts # Exports all handlers
│ ├── audio.ts # Audio transcription handler
│ ├── chat.ts # Chat completion handler
│ └── tts.ts # Text-to-speech handler
└── ui/ # UI components
├── index.ts # Exports all UI components
├── html.ts # HTML template
├── styles.ts # CSS styles
├── tailwind.ts # Tailwind configuration
└── alpine.ts # Alpine.js code
GET /
- Main web interfacePOST /transcribe-audio
- Transcribe audio recordingsPOST /chat
- Send chat messages to Groq LLMPOST /text-to-speech
- Convert text to speech
GROQ_API_KEY
- Your Groq API key
- Hono - Lightweight web framework
- Alpine.js - Front-end JavaScript framework
- Tailwind CSS - Utility-first CSS framework
- Groq API - LLM provider with Llama-3.3-70b-versatile model
- Groq Whisper API - Audio transcription
- PlayHT (via Groq) - Text-to-speech synthesis