Skip to content

Conversation

@mickael-menu
Copy link
Member

@mickael-menu mickael-menu commented Oct 29, 2025

Added

Navigator

  • Added [TTSVoice].filterByLanguage(_:) to filter TTS voices by language and region.
  • Added [TTSVoice].sorted() to sort TTS voices by region, quality, and gender.

Changed

Navigator

  • Eloquence and novelty TTS voices are removed from the PublicationSpeechSynthesizer API, as they are not a good fit to read publications.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds filtering and sorting capabilities for TTS voices, introducing two new extension methods to help manage and organize available voices by language, region, quality, and gender.

  • Adds [TTSVoice].filterByLanguage(_:) to filter voices by language with support for both base language and region-specific filtering
  • Adds [TTSVoice].sorted() to sort voices by multiple criteria: region priority, quality, gender, and name
  • Updates TTSVoice.Quality enum to include lower and higher cases and changes name from optional to non-optional

Reviewed Changes

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

Show a summary per file
File Description
Sources/Navigator/TTS/TTSVoice.swift Moves TTSVoice to dedicated file and adds filtering and sorting extension methods
Sources/Navigator/TTS/TTSEngine.swift Removes TTSVoice definition (moved to separate file)
Sources/Shared/Toolkit/Language.swift Adds Region struct to support region-based operations
Tests/NavigatorTests/TTS/TTSVoiceTests.swift Comprehensive test suite covering filtering, sorting, and edge cases
CHANGELOG.md Documents the new public API additions
Comments suppressed due to low confidence (1)

Sources/Navigator/TTS/TTSVoice.swift:1

  • The mapping from AVSpeechSynthesisVoice.quality to TTSVoice.Quality is incomplete. The new lower and higher quality cases are never assigned. Consider mapping .premium to .higher instead of .high, and review whether .default should map to .low or .lower instead of .medium for better utilization of the new quality levels.
//

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mickael-menu mickael-menu merged commit 7c0436c into develop Oct 29, 2025
5 checks passed
@mickael-menu mickael-menu deleted the tts-voice-order branch October 29, 2025 14:08
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.

2 participants