@@ -48,8 +48,11 @@ public async Task generate_async_should_return_cached_response_without_generatin
4848 {
4949 var cachedUri = new Uri ( "https://cdn.example.com/tts/abc123.wav" ) ;
5050
51+ _audioProcessingService
52+ . Setup ( x => x . GetEffectiveSynthesisProfile ( "en-us+klatt4" , 165 ) )
53+ . Returns ( ( "mb-us1" , 130 ) ) ;
5154 _cacheService
52- . Setup ( x => x . CreateCacheKey ( "Press 1 for yes" , "en-us+klatt4 " , 165 ) )
55+ . Setup ( x => x . CreateCacheKey ( "Press 1 for yes" , "mb-us1 " , 130 ) )
5356 . Returns ( CacheKey ) ;
5457 _cacheService
5558 . Setup ( x => x . TryGetCachedUrlAsync ( CacheKey , It . IsAny < CancellationToken > ( ) ) )
@@ -78,8 +81,11 @@ public async Task generate_async_should_generate_and_store_audio_when_cache_miss
7881 var audioBytes = new byte [ ] { 1 , 2 , 3 , 4 } ;
7982 var objectUri = new Uri ( "https://cdn.example.com/tts/abc123.wav" ) ;
8083
84+ _audioProcessingService
85+ . Setup ( x => x . GetEffectiveSynthesisProfile ( "en-us+klatt4" , 165 ) )
86+ . Returns ( ( "mb-us1" , 130 ) ) ;
8187 _cacheService
82- . Setup ( x => x . CreateCacheKey ( "Press 1 for yes" , "en-us+klatt4 " , 165 ) )
88+ . Setup ( x => x . CreateCacheKey ( "Press 1 for yes" , "mb-us1 " , 130 ) )
8389 . Returns ( CacheKey ) ;
8490 _cacheService
8591 . SetupSequence ( x => x . TryGetCachedUrlAsync ( CacheKey , It . IsAny < CancellationToken > ( ) ) )
@@ -113,6 +119,9 @@ public async Task generate_async_should_apply_configured_klatt_variant_to_reques
113119 var cachedUri = new Uri ( "https://cdn.example.com/tts/xyz789.wav" ) ;
114120 var cacheKey = new TtsCacheKey ( "xyz789" , "tts/xyz789.wav" ) ;
115121
122+ _audioProcessingService
123+ . Setup ( x => x . GetEffectiveSynthesisProfile ( "fr+klatt4" , 165 ) )
124+ . Returns ( ( "fr+klatt4" , 165 ) ) ;
116125 _cacheService
117126 . Setup ( x => x . CreateCacheKey ( "Bonjour" , "fr+klatt4" , 165 ) )
118127 . Returns ( cacheKey ) ;
@@ -138,8 +147,11 @@ public async Task generate_async_should_replace_legacy_default_voices_with_confi
138147 var cachedUri = new Uri ( "https://cdn.example.com/tts/legacy.wav" ) ;
139148 var cacheKey = new TtsCacheKey ( "legacy" , "tts/legacy.wav" ) ;
140149
150+ _audioProcessingService
151+ . Setup ( x => x . GetEffectiveSynthesisProfile ( "en-us+klatt4" , 165 ) )
152+ . Returns ( ( "mb-us1" , 130 ) ) ;
141153 _cacheService
142- . Setup ( x => x . CreateCacheKey ( "Press 1 for yes" , "en-us+klatt4 " , 165 ) )
154+ . Setup ( x => x . CreateCacheKey ( "Press 1 for yes" , "mb-us1 " , 130 ) )
143155 . Returns ( cacheKey ) ;
144156 _cacheService
145157 . Setup ( x => x . TryGetCachedUrlAsync ( cacheKey , It . IsAny < CancellationToken > ( ) ) )
@@ -174,8 +186,11 @@ public async Task generate_async_should_deduplicate_concurrent_generation_for_th
174186 var allowGenerationCompletion = new TaskCompletionSource < bool > ( TaskCreationOptions . RunContinuationsAsynchronously ) ;
175187 var cacheLookupCount = 0 ;
176188
189+ _audioProcessingService
190+ . Setup ( x => x . GetEffectiveSynthesisProfile ( "en-us+klatt4" , 165 ) )
191+ . Returns ( ( "mb-us1" , 130 ) ) ;
177192 _cacheService
178- . Setup ( x => x . CreateCacheKey ( "Press 1 for yes" , "en-us+klatt4 " , 165 ) )
193+ . Setup ( x => x . CreateCacheKey ( "Press 1 for yes" , "mb-us1 " , 130 ) )
179194 . Returns ( CacheKey ) ;
180195 _cacheService
181196 . Setup ( x => x . TryGetCachedUrlAsync ( CacheKey , It . IsAny < CancellationToken > ( ) ) )
0 commit comments