Skip to content

Update speech server engine following change in controls handling - #57

Merged
JayPanoz merged 3 commits into
mainfrom
speech-server-update
Aug 26, 2026
Merged

Update speech server engine following change in controls handling#57
JayPanoz merged 3 commits into
mainfrom
speech-server-update

Conversation

@JayPanoz

Copy link
Copy Markdown
Contributor

This update covers readium/speech-server#31

Specifically, it handles the shifting from per-voice to provider-level controls.

@JayPanoz
JayPanoz marked this pull request as ready for review August 26, 2026 08:10
@JayPanoz
JayPanoz requested a lite review from Copilot August 26, 2026 08:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Speech Server integration to account for speech-server moving controls from per-voice (GET /voices) to provider-level (GET /service), ensuring client-side rate handling reflects what the server actually honors.

Changes:

  • Fetches /service alongside /voices and maps provider-level controls onto each returned ReadiumSpeechVoice.
  • Updates SpeechServer TypeScript types and mapping utilities to remove per-voice controls and add provider controls to SpeechServerServiceInfo.
  • Adjusts tests and bumps package version + changelog entry for the fix.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/SpeechServer/testUtils.ts Updates test voice factory to stop emitting per-voice controls by default.
test/SpeechServer/speechServerEngineProvider.test.ts Updates provider tests to supply /service provider-level controls and assert merged controls on voices.
test/SpeechServer/speechServerEngine.test.ts Updates engine tests to model provider-level controls during background voice resolution.
src/SpeechServer/types.ts Removes controls from SpeechServerVoice and adds controls (and optional quality) to service providers.
src/SpeechServer/speechServerVoiceMapping.ts Changes mapping to accept provider controls and assign them to the mapped ReadiumSpeechVoice.
src/SpeechServer/speechServerEngineProvider.ts Fetches /service in getVoices() and merges provider controls into each voice.
src/SpeechServer/speechServerEngine.ts Fetches service info when loading voices and merges provider controls to avoid incorrect local rate fallback.
package.json Bumps version to 0.7.1.
CHANGELOG.md Documents the fix and the upstream API change.
Suppressed comments (1)

test/SpeechServer/speechServerEngine.test.ts:553

  • These assertions/setVoice calls should use the documented ElevenLabs provider id segment (elevenlabs) in the URN, to match what the speech-server actually returns/accepts.
  engine.setVoice("urn:readium:tts:eleven:estelle"); // supersedes the still-pending lookup for "alba"
  await flush();

  t.is(engine.getCurrentVoice()?.identifier, "urn:readium:tts:eleven:estelle", "the later setVoice() call wins, not the earlier one's background resolution");

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/SpeechServer/speechServerEngine.test.ts
@JayPanoz
JayPanoz merged commit 481d723 into main Aug 26, 2026
@JayPanoz
JayPanoz deleted the speech-server-update branch August 26, 2026 08:24
@github-project-automation github-project-automation Bot moved this from Draft to Done in Readium Speech Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants