
This one gives you Web Speech API hooks for React that handle both speech recognition and text-to-speech. You get a useSpeechRecognition hook with continuous listening support and a useSpeechSynthesis hook with voice selection and playback controls. The command detection pattern is straightforward, matching phrases or regex patterns against transcripts. Good for adding voice search, dictation inputs, or hands-free navigation without reaching for external APIs. The code is client-side only and browser-dependent, so you'll want fallbacks. Works best for accessibility features or when keyboard and mouse aren't practical.
$ npx -y skills add daffy0208/ai-dev-standards --skill voice-interface-builder --agent claude-codeInstalls into .claude/skills of the current project.
I help you build voice-enabled interfaces using the Web Speech API and modern voice technologies.
Speech Recognition:
Text-to-Speech:
Voice UI:
// hooks/useSpeechRecognition.ts
'use client'
import { useState, useEffect, useRef } from 'react'
interface SpeechRecognitionOptions {
continuous?: boolean
language?: string
onResult?: (transcript: string) => void
onError?: (error: string) => void
}
export function useSpeechRecognition({
continuous = false,
language = 'en-US',
onResult,
onError
}: SpeechRecognitionOptions = {}) {
const [isListening, setIsListening] = useState(false)
const [transcript, setTranscript] = useState('')
const recognitionRef = useRef<SpeechRecognition | null>(null)
Sponsors