⚙️ fix: update Azure OpenAI STT/TTS env handling (#4859)

This commit is contained in:
Marco Beretta 2024-12-04 17:44:00 +01:00 committed by GitHub
parent 9f25afef91
commit affcebd48c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View file

@ -143,9 +143,9 @@ class TTSService {
*/
azureOpenAIProvider(ttsSchema, input, voice) {
const url = `${genAzureEndpoint({
azureOpenAIApiInstanceName: ttsSchema?.instanceName,
azureOpenAIApiDeploymentName: ttsSchema?.deploymentName,
})}/audio/speech?api-version=${ttsSchema?.apiVersion}`;
azureOpenAIApiInstanceName: extractEnvVariable(ttsSchema?.instanceName),
azureOpenAIApiDeploymentName: extractEnvVariable(ttsSchema?.deploymentName),
})}/audio/speech?api-version=${extractEnvVariable(ttsSchema?.apiVersion)}`;
if (
ttsSchema?.voices &&
@ -157,7 +157,7 @@ class TTSService {
}
const data = {
model: ttsSchema?.model,
model: extractEnvVariable(ttsSchema?.model),
input,
voice: ttsSchema?.voices && ttsSchema.voices.length > 0 ? voice : undefined,
};