Defines speech timeout constants and helper to compute timeout from model settings for voice synthesis.
// Source: https://github.com/HKUDS/DeepTutor | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import type { CatalogModel, VoiceOptions, VoiceModelOption } from './model-catalog-types'
export const DEFAULT_SPEECH_REQUEST_TIMEOUT = 60
export const MIN_SPEECH_REQUEST_TIMEOUT = 5
export const MAX_SPEECH_REQUEST_TIMEOUT = 600
export const SPEECH_TIMEOUT_MESSAGE =
'Speech synthesis timed out. Increase Request timeout (seconds) in the speech model settings or try shorter text.'
export const SPEECH_PLAYBACK_FAILURE_MESSAGE =
'Speech playback failed. Check the speech model settings and provider connection.'
export function speechRequestTimeout(model: CatalogModel | undefined): number
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key