voice/speech-types.ts

alvarolorentedev/opencode-mobile · shared/platform/voice/speech-types.ts · typescript · Apache-2.0
voice

Shared speech-output contract. Kept dependency-free so provider selectors, tests, and both the system and on-device engines can import it without pulling in a native module.

// Source: https://github.com/alvarolorentedev/opencode-mobile | 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.
// Shared speech-output contract. Kept dependency-free so provider selectors,
// tests, and both the system and on-device engines can import it without
// pulling in a native module.

export type SpeechPlayback =
  | { engine: 'system'; voice?: string }
  | { engine: 'local'; packId: string; speakerId: number };

export type SpeechFallbackReason =
  | 'unsupported'
  | 'missing'
  | 'not-ready'
  | 'language-mismatch'
  | 'init-failed';

export type SpeechCues = {
  codeBlock?: string;
  table?: string;
};

export type SpeakTextOptions = {
  text: string;
  language?: str

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key