Skip to content

fix: optimize concurrency settings and update documentation for performance improvements#24

Merged
ronibhakta1 merged 1 commit into
readium:mainfrom
ronibhakta1:fix/france-voice-performance
Jul 20, 2026
Merged

fix: optimize concurrency settings and update documentation for performance improvements#24
ronibhakta1 merged 1 commit into
readium:mainfrom
ronibhakta1:fix/france-voice-performance

Conversation

@ronibhakta1

Copy link
Copy Markdown
Contributor

This pull request makes several improvements to CPU resource management, model selection, and logging for the PocketTTS-based synthesizer. The most significant changes are: defaulting to smaller, faster 6-layer models for most languages (except French), improving hardware-aware concurrency configuration, clarifying documentation around model sizes and CPU usage, and enhancing logging with synthesis timing details. These updates ensure better performance, more predictable resource usage, and clearer configuration/setup for users.

Concurrency and resource management improvements:

  • The default value for max_concurrent_syntheses is reduced from 2 to 1 to avoid CPU oversubscription on small hardware; detailed comments clarify that each synthesis uses ~2 cores, and configure.sh now derives optimal values from detected hardware. [1] [2] [3] [4]
  • Documentation (configuration.md) is updated to explain that each synthesis job uses ~2 CPU cores, and that concurrency is now hardware-derived rather than a static default.

Model selection and documentation:

  • The language-to-model mapping in _LANG_MODEL now defaults to the 6-layer model for all supported languages except French, which only has a 24-layer model; this is explained in both code comments and documentation. [1] [2] [3] [4] [5]
  • Documentation is clarified to show which model variant is used for each language, including a new table in the provider docs.

Performance and logging enhancements:

  • Synthesis logging is improved to include start/finish messages and timing for generation and encoding, aiding performance monitoring and debugging. [1] [2] [3]

Threading and provider loading:

  • The provider loader no longer sets torch.set_num_threads(1) because PocketTTS already manages this internally to optimize CPU usage.

These changes together make the system more efficient, easier to configure for different hardware, and clearer for users and developers.

@ronibhakta1
ronibhakta1 merged commit 8a22427 into readium:main Jul 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant