Re-working voices for Pocket TTS#19
Conversation
Avoided duplication across languages Added "otherLanguages" Changed quality to very high Dropped properties that are tied to the model rather than the voice
|
Let's illustrate things with an updated voice from {
"name": "Alba",
"originalName": "alba",
"identifier": "urn:readium:tts:pocket:alba",
"language": "en-US",
"otherLanguages": ["fr", "es", "de", "it", "pt-PT"],
"gender": "male"
}For Pocket TTS itself, we would have the following info: {
"quality": "veryHigh",
"controls": {
"pitch": false,
"speed": false,
"ssml": false,
"boundary": false
}
}Given what we know about the model, we could return the following representation when listing voices: {
"name": "Alba",
"originalName": "alba",
"provider": "pocket",
"identifier": "urn:readium:tts:pocket:alba",
"language": "en-US",
"otherLanguages": ["fr", "es", "de", "it", "pt-PT"],
"gender": "male",
"quality": "veryHigh",
"controls": {
"pitch": false,
"speed": false,
"ssml": false,
"boundary": false
}
}With this approach:
With good defaults on controls, this could be further simplified like this: {
"name": "Alba",
"originalName": "alba",
"provider": "pocket",
"identifier": "urn:readium:tts:pocket:alba",
"language": "en-US",
"otherLanguages": ["fr", "es", "de", "it", "pt-PT"],
"gender": "male",
"quality": "veryHigh"
}In the future, we might encounter models with support for SSML or boundaries only on certain voices (that's the case with Microsoft Azure's API). In such cases, their {
"name": "Joe",
"originalName": "joe",
"identifier": "urn:readium:tts:microsoft:joe",
"language": "en-US",
"gender": "male",
"controls": {
"ssml": true
}
} |
|
@HadrienGardeur There are few other things I would ask is, Currently the number of Is there any specific default limit you would like to set here or
As of now, Yes. we are keeping thing as much as we can per Model like
It should be a intersection list of features as per me.
We should show what the server is capable of on top of it as the user just want to use the highest quality audio. My question is: How do we handle the |
It's fine as-is. We'll need to default per model defaults and see if we can provide a configuration for all models.
In this context, we're talking about the quality of the voice, not the quality of the audio output. This is consistent with what we've done in Readium Speech. For the output, we should default to WAV and only transcode to OPUS or MP3 if asked for. |
That makes sence to me now. Thank you. |
- Add CircuitBreaker and CircuitBreakerRegistry classes to manage service call failures. - Implement logic to handle state transitions between CLOSED, OPEN, and HALF_OPEN. - Create tests for CircuitBreaker functionality to ensure reliability. feat: add voice loading functionality with language resolution - Introduce ControlsOverride and VoiceEntry models for voice configuration. - Implement functions to resolve install languages and plan installations based on enabled languages. - Create build_voice function to merge voice properties and defaults. feat: define service capabilities schema - Add OutputCapabilities, Limits, ProviderCapabilities, and ServiceCapabilities models to define service capabilities. - Ensure proper validation and structure for service responses. docs: document deployment process and provider capabilities - Create deployment.md to outline automated deployment steps and configuration management. - Add provider documentation for PocketTTS, detailing model-level defaults and audio output specifications. feat: implement pruning script for unused weight files - Add prune_weights.py script to clean up unused language models and embeddings based on current configuration. - Implement safety checks to prevent accidental deletion of shared blobs. test: add comprehensive tests for circuit breaker and voice loading - Create tests for CircuitBreaker to validate state transitions and failure handling. - Add tests for voice loading functions to ensure correct language resolution and installation planning. - Implement service tests to verify API responses and structure.
Caution
This is a WIP and will require to update the API, docs and integration with Pocket TTS.
With this draft PR, I've vastly simplified the list of voices for Pocket TTS, hoping to set a template for future integrations as well.
The following keys are currently used:
namefor the name of the voice meant to be displayed to the useroriginalNamefor the name of the voice used by the hosted model behind the scenesidentifieris a unique identifier that is used to reference the voice in all requests to synthesize audiolanguagefor the primary language support for a voiceotherLanguagesfor a list of other languages that the voice can supportgenderqualityOverall, the idea is to avoid repeating information that can be documented at a model-level and doesn't require voice-level information.
Compared to what we had before:
identifierwithlanguagein their requests instead)Note
In the case of Pocket TTS,
qualityis a good candidate of a property that could be moved to the model for now since all voices are currently labeled asveryHigh.Overall, the idea is to:
/voices) should merge model and voice-level information, to provide a complete view to the clientIn the case of Pocket TTS:
All of these info could be part of the service that we create for each integration/model.
At this point, the output format remains my biggest question:
For now, I would prefer avoiding repeating this info at a voice-level, to keep the payload reasonably small.