fix: harden custom TTS URL handling and availability checks
Validate and normalize custom TTS server URLs before proxying requests. Gate server TTS availability by provider mode to avoid OpenAI/custom misrouting. Keep browser and message TTS hooks aligned with the new provider-specific checks.
This commit is contained in:
@@ -44,6 +44,7 @@ export function useMessageTTS(): UseMessageTTSReturn {
|
||||
|
||||
const { speak: speakServerTTS, stop: stopServerTTS, isAvailable: isServerTTSAvailable } = useServerTTS({
|
||||
enabled: shouldCheckOpenAIAvailability,
|
||||
availabilityMode: voiceProvider === 'openai-compatible' ? 'openai-compatible' : 'openai',
|
||||
});
|
||||
const { speak: speakSayTTS, stop: stopSayTTS, isAvailable: isSayTTSAvailable } = useSayTTS({
|
||||
enabled: shouldCheckSayAvailability,
|
||||
|
||||
Reference in New Issue
Block a user