feat(tts): Wyoming service discovery and multi-model seeding#32
Open
AsierZunzu wants to merge 1 commit into
Open
feat(tts): Wyoming service discovery and multi-model seeding#32AsierZunzu wants to merge 1 commit into
AsierZunzu wants to merge 1 commit into
Conversation
77b1fef to
d24ca0f
Compare
d24ca0f to
2ffde6a
Compare
c655ab1 to
5463aff
Compare
6521205 to
5b8eddf
Compare
cc9dae0 to
f43dfe8
Compare
Replace single PIPER_HOST/PIPER_PORT with PIPER_SERVICES (comma-separated host:port pairs). On worker startup, send describe→info to each endpoint, upsert voice and languages into tts_services, and warn for feeds that reference unknown services. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f43dfe8 to
4ce5227
Compare
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
compose.yaml: Replaced the singlettsservice withtts-englishandtts-spanish; removedPIPER_HOST/PIPER_PORTenv vars fromnarratioand addedPIPER_SERVICES: "tts-english:10200,tts-spanish:10200"; updateddepends_onaccordingly.src/utils/env.ts: RemovedPIPER_HOSTandPIPER_PORTaccessors; addedPIPER_SERVICESas a required string accessor (comma-separatedhost:portpairs).src/db/schema.ts: Addedvoice TEXT(nullable) andlanguages TEXT(nullable, stores JSON array) to thettsServicestable.src/db/index.ts: UpdatedTTS_SERVICES_SQLto include the new columns; added twoALTER TABLEmigration statements for existing DBs; updatedseedFromEnvto seed fromPIPER_SERVICESinstead ofPIPER_HOST/PIPER_PORT.src/db/tts-services.ts: AddedgetTtsServiceByHostPortandupsertTtsServiceByHostPortfunctions; extendedInsertTtsServiceParamswith optionalvoice/languagesfields.src/services/tts.ts: AddeddiscoverService(host, port)— opens a TCP connection, sends{"type":"describe"}\n, reads until aninfoevent, extractstts[0].name(voice) andtts[0].languages, returnsTtsServiceInfo | null. Returnsnullon any error (timeout, refused, malformed).src/worker/index.ts: AddedseedTtsServices()— parsesPIPER_SERVICES, callsdiscoverServicefor each endpoint, upserts intotts_services(updates voice/languages if the host:port row exists, inserts with a generated name otherwise), logs discovered voices, and warns about feeds referencing unknown TTS service IDs. Called once at startup before the firstrunOnce.tests/helpers/schema.ts: Addedvoiceandlanguagescolumns toTEST_SCHEMA_SQLso in-memory test DBs match the updated schema.New env var format
Example:
PIPER_SERVICES=tts-english:10200,tts-spanish:10200Startup seeding flow
seedTtsServices()host:portinPIPER_SERVICES: senddescribe→ receiveinfo→ extractvoice+languagestts_services(insert on first run, update voice/languages on subsequent runs)tts_service_iddoesn't match a known serviceTest plan
npm run lintpasses (tsc --noEmit, no type errors)npm testpasses (103 tests across 11 test files)discoverServicereturnsnullgracefully on connection refused / timeoutvoice/languagescolumns viaALTER TABLEmigrations without data loss🤖 Generated with Claude Code