Repository navigation
Speak with LFM3-Audio and Soprano through the native model-type opt-in - #1791
Merged
Merged
Conversation
Generated from llamadart-native main eb760895 (llama.cpp cd959bae) headers, packaged as the release workflow does, with native_header_archive.py and ffigen in a Linux container. The same procedure reproduces the committed v0.8.0-3 bindings byte for byte.
…type opt-in Drive llama_dart_tts_get_info_ext/init_ext/start_with_voice with the mask of types this core handles and the runtime builds, list predefined voices when the runtime exports the voice API, and add Lfm3AudioTtsAdapter, SopranoTtsAdapter, TextToSpeechRequest.voice and TextToSpeechCapabilities.supportsVoice/voices. TextToSpeechEngine.load asks the backend which models its runtime drives and refuses an adapter none of whose models it drives before loading anything, naming the required llamadart-native version. Refs #1615.
This was referenced Nov 8, 2026
…rano # Conflicts: # website/docs/platforms/support-matrix.md
leehack
marked this pull request as ready for review
November 8, 2026 13:05
Contributor
|
Chat app preview removed for |
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_exttransport (llama_dart_tts_supported_model_types,get_info_ext,init_ext,start_with_voice), selected by runtime probe, never by version. Refs Expose LFM3 and Soprano speech output from native v0.8.0 #1615.TextToSpeechRequest.voice,TextToSpeechCapabilities.supportsVoice/voices, read fromllama_dart_tts_get_voice_count/get_voice_namewhen the runtime lists them. The voice API lands here, not in the Expose Chatterbox and Pocket TTS voices from native v0.9.0 #1783 PR, because LFM3-Audio already takesfemale/male.TextToSpeechEngine.loadasks the runtime which families it drives before loading any file (new backend SPIBackendTextToSpeechModelSupport), so a runtime that cannot load the LFM3/Soprano architecture refuses with a typedLlamaUnsupportedExceptionnaming the missing symbol andllamadart-native v0.8.0, instead of a generic model-load failure.main, which now pins llamadart-native v0.9.0 (Adopt llamadart-native v0.9.0 #1784 merged;mainmerged into this branch). Chatterbox and Pocket TTS follow in Speak with Chatterbox and Pocket TTS, with predefined voices #1792, stacked on this one.Production-readiness scope
Lfm3AudioTtsAdapterandSopranoTtsAdapterforTextToSpeechEngine; LFM3 voicesfemale(default) andmaleplus pass-throughlanguage; Soprano 32 kHz output. New CLIexample/basic_app/bin/llamadart_text_to_speech_example.dart.loadthrowsLlamaUnsupportedExceptionnamingllama_dart_tts_init_extand v0.8.0; Qwen3-TTS keeps working.voicesis empty; a requested voice is still passed tostart_with_voice, and an unknown one fails with the native "unknown TTS voice" error.ttschat template: capabilities report unsupported with that reason.loadrefuses non-Qwen3 families ("Web text-to-speech drives Qwen3-TTS only").voice,languageand speaker reference throwLlamaUnsupportedExceptionbefore synthesis.Completeness checklist
supportsVoice/voicesjoin the speech-capabilities exemption, whose reason now citestext-to-speech-models-smokeand Expose LFM3 and Soprano speech output from native v0.8.0 #1615.PR type guidance
Test Plan
dart run tool/prepare_workspace.dartdart format --output=none --set-exit-if-changed .dart analyzedart test -p vm -j 1 --exclude-tags local-only(macOS arm64, after mergingmainwith itsv0.9.0pin, isolated TMPDIR): 11514 pass, 129 skip, 6 fail (allwindows_registry_qualification_test.dart: nopwshon this host)dart test -p chrome --exclude-tags local-only: 4626 pass, 1 skip (before mergingmain; CI's Chrome lanes cover the current head)coverage-libmatrix row: not run locally;mainenforces it after merge.text-to-speech-models-smoke,llama-cpp-exit-teardown(quit-speaking), version-skew runs on v0.7.0-2 and v0.8.0-3,validation_coverage_test,package_skills_test.Matrix Evidence
main(#1784 landed, pinv0.9.0); no local native overridemale, Soprano, Chatterbox Turbo default and cloned, Multilingual default and cloned, Pocket default andvera; Multilingualfrgives "Bonjour, comment allez-vous aujourd'hui?". Run from the #1792 head, which contains this PR.male, Soprano. Voices[female, male]; Soprano 32 kHz.--voice maleworks; unknown voice fails with "Text-to-speech startup failed. (unknown TTS voice)".LlamaUnsupportedExceptionnamingllama_dart_tts_init_extand v0.8.0 before loading; Qwen3-TTS still synthesizes.exit()mid-synthesis{"quit-speaking":[0,0,0]}for LFM3 and Soprano._TtsApitest/integration/backends/llama_cpp_tts_model_types_test.dart,text_to_speech_test.dart,native_backend_test.dart.mainafter merge.Review Notes
03cdbaaa(fresh auditor session, 0 P1/P2; 2099 VM tests; real-model smoke on published v0.9.0 incl. Qwen3-TTS regression 6/6; 20/26 mutants killed, survivors non-reachable or test gaps).lib/backend.dartchange is an SPI export only, with no parser, grammar, rendering or streaming code. Readiness evaluator: allow export-only public-entrypoint changes without structured-output evidence #1804 adds a precise export-only exception to the tool.textToSpeechModelUnsupportedReasonis compile-tested only.03cdbaaade(merge ofmainafter Adopt llamadart-native v0.9.0 #1784 landed), PR CI https://github.com/leehack/llamadart/actions/runs/42477102068 green: 34 pass, 9 skipped. On the first attempt Example Package Tests failed in the third-partysqlite3build hook ("Hash of downloaded file libsqlite3.x64.linux.so is 8e8052a0…, expected b1772918…"), a download fault unrelated to this diff; the rerun of that job passed.High-risk regression review
backendRuntime,regressionPolicy,structuredOutput).structuredOutputcomes only fromlib/backend.dartexporting the new SPI; there is no parser, grammar or streaming change, so its row is N/A.03cdbaaa, 0 PR-caused P1/P2.03cdbaaa/ merge based51a3229. Main adds only non-overlapping commits.init_ext,start_with_voiceor the pre-load probe is bypassed (the legacy-path and refusal tests assert the exact calls made).