VideoUltra API
    Preparing search index...

    Interface SpeechGenerator

    Turns text into speech. Implement it to use your own service.

    interface SpeechGenerator {
        appliesSpeed?: boolean;
        speak(request: SpeechRequest): Promise<Blob>;
        voices(): SpeechVoice[] | Promise<SpeechVoice[]>;
    }
    Index
    appliesSpeed?: boolean

    true: the service speaks at SpeechRequest.speed itself. Otherwise (the default) the editor asks for normal speed and plays the added clip at the chosen speed with the voice's pitch kept ("Keep the voice natural"), so the speed works with any service.

    • The speech as an audio file the browser can decode (MP3, WAV, Opus…).

      Parameters

      • request: SpeechRequest

      Returns Promise<Blob>

    • The voices to offer (first = default).

      Returns SpeechVoice[] | Promise<SpeechVoice[]>