__construct(Onnxruntime $onnxruntime, OpenJtalk $openJtalk, AccelerationMode $accelerationMode = Auto, int $cpuNumThreads = 0) | Initializes the synthesizer. |
onnxruntime(): Onnxruntime | Returns the Onnxruntime instance held by this synthesizer. |
isGpuMode(): bool | Returns whether GPU mode is enabled. |
metas(): string | Returns metadata for all loaded speakers as a JSON string. |
loadVoiceModel(VoiceModelFile $model, OnExistingVoiceModelId $onExisting = Error): void | Loads a voice model. Use $onExisting to choose what happens when a model with the same ID is already loaded. |
unloadVoiceModel(string $voiceModelId): void | Unloads a voice model by its hex ID. |
isLoadedVoiceModel(string $voiceModelId): bool | Returns whether a voice model is loaded. |
createAudioQuery(string $text, int $styleId): string | Generates an AudioQuery JSON from Japanese text. |
createAudioQueryFromKana(string $kana, int $styleId): string | Generates an AudioQuery JSON from AquesTalk-style kana notation. |
createAccentPhrases(string $text, int $styleId): string | Generates an accent phrase array JSON from Japanese text. |
createAccentPhrasesFromKana(string $kana, int $styleId): string | Generates an accent phrase array JSON from kana notation. |
replaceMoraData(string $accentPhrasesJson, int $styleId): string | Returns updated accent phrases with mora pitch and phoneme length from another style. |
replacePhonemeLength(string $accentPhrasesJson, int $styleId): string | Returns updated accent phrases with phoneme lengths from another style. |
replaceMoraPitch(string $accentPhrasesJson, int $styleId): string | Returns updated accent phrases with mora pitch from another style. |
synthesis(string $audioQueryJson, int $styleId, bool $enableInterrogativeUpspeak = true): string | Synthesizes speech from an AudioQuery JSON. Returns WAV binary. |
createAudioFeature(string $audioQueryJson, int $styleId, bool $enableInterrogativeUpspeak = true): AudioFeature | Creates the AudioFeature intermediate representation used for frame-based rendering. |
tts(string $text, int $styleId, bool $enableInterrogativeUpspeak = true): string | Synthesizes speech from Japanese text in one step. Returns WAV binary. |
ttsFromKana(string $kana, int $styleId, bool $enableInterrogativeUpspeak = true): string | Synthesizes speech from kana notation. Returns WAV binary. |
createSingFrameAudioQuery(string $scoreJson, int $styleId): string | Generates a singing synthesis query JSON from a score JSON. |
frameSynthesis(string $frameAudioQueryJson, int $styleId): string | Synthesizes singing audio from a frame audio query. Returns WAV binary. |
createSingFrameF0(string $scoreJson, string $frameAudioQueryJson, int $styleId): string | Generates per-frame F0 (fundamental frequency) values as a JSON float array. |
createSingFrameVolume(string $scoreJson, string $frameAudioQueryJson, int $styleId): string | Generates per-frame volume values as a JSON float array. |