Files
opencode-manager/frontend/src/hooks/useTTS.ts
T
Chris Scott c7de65290a Add GitHub token validation and improve TTS configuration
- Add git token validation endpoint and UI validation
- Improve TTS endpoint normalization and discovery
- Move shared types to workspace package
- Add better error handling for TTS API calls
- Support composite voices for Kokoro-style TTS
- Auto-fetch TTS models and voices on config change
2025-12-15 14:43:03 -05:00

13 lines
341 B
TypeScript

import { useContext } from 'react'
import { TTSContext, type TTSContextValue, type TTSState } from '@/contexts/tts-context'
export type { TTSState }
export function useTTS(): TTSContextValue {
const context = useContext(TTSContext)
if (!context) {
throw new Error('useTTS must be used within a TTSProvider')
}
return context
}