mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
- 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
13 lines
341 B
TypeScript
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
|
|
}
|