Read messages aloud through a local speech server - #9
Open
zorenkonte wants to merge 4 commits into
Open
zorenkonte wants to merge 4 commits into
zorenkonte wants to merge 4 commits into
Conversation
This branch has not been deployed
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
speak: trueused the TV's built-in text-to-speech engine, which sounds robotic on many sets. The TV can now fetch natural-sounding audio from a speech server on the LAN (Piper by default) and play that instead, falling back to the TV voice when the server does not answer. The API is unchanged; the voice source is a TV setting.Changes
Settings: newspeechServerpreference, empty by default.sound/SpeechServer: normalizes the setting.host:portposts JSON{"text": ...}to/synthesize(Piper's HTTP API); a URL containing{text}is fetched with GET and the text URL-encoded; an explicit path is posted to as is. Eight JVM tests.sound/SpeechFetcher: downloads the audio off the main thread with an 8 s timeout and a 5 MB cap into the cache dir, deleting the previous file.sound/SpeechPlayer: fetch and play through the existingUrlSoundPlayer, or speak with the device engine when no server is set or the fetch fails. Reports which source spoke.SoundPlayernow uses it in place ofSpeaker.SettingsPaneandHomeScreenaccept aninitialSectionso a preview can open on a tab; newSoundTabPreview.{text}template, fallback behavior), TV settings reference, Notification behavior, README bullet.Testing
./gradlew testDebugUnitTest lintDebug assembleDebugpasses, 74 tests../gradlew updateDebugScreenshotTestrenders the new Sound tab preview: no overflow, both new rows fit.cd docs && npm run buildpasses with no dead links.--host 0.0.0.0, enterPC_IP:5000under Sound, press Test voice, then send a notification withspeak: true. Stop Piper and send again to hear the fallback.Checklist
cd tv && ./gradlew testDebugUnitTest assembleDebugpassescd client && npm run lint && npm run buildpasses (client unchanged)