File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { filterByProvider } from "../core/voice-utils" ;
2+ import { GeminiTTSClient } from "../engines/gemini" ;
3+
4+ describe ( "VoiceUtils" , ( ) => {
5+ it ( "filters Gemini unified voices by provider" , async ( ) => {
6+ const client = new GeminiTTSClient ( { apiKey : "test-api-key" } ) ;
7+ const voices = await client . getVoices ( ) ;
8+
9+ const geminiVoices = filterByProvider ( voices , "gemini" ) ;
10+
11+ expect ( geminiVoices ) . toHaveLength ( voices . length ) ;
12+ expect ( geminiVoices . every ( ( voice ) => voice . provider === "gemini" ) ) . toBe ( true ) ;
13+ } ) ;
14+ } ) ;
Original file line number Diff line number Diff line change @@ -33,16 +33,7 @@ export function filterByGender(
3333 */
3434export function filterByProvider (
3535 voices : UnifiedVoice [ ] ,
36- provider :
37- | "azure"
38- | "google"
39- | "ibm"
40- | "elevenlabs"
41- | "polly"
42- | "witai"
43- | "playht"
44- | "openai"
45- | "sherpa"
36+ provider : UnifiedVoice [ "provider" ]
4637) : UnifiedVoice [ ] {
4738 return voices . filter ( ( voice ) => voice . provider === provider ) ;
4839}
You can’t perform that action at this time.
0 commit comments