diff --git a/lib/routes/api/tts-cache.js b/lib/routes/api/tts-cache.js index 9fc25aa9..71707ca4 100644 --- a/lib/routes/api/tts-cache.js +++ b/lib/routes/api/tts-cache.js @@ -188,10 +188,11 @@ router.post('/Synthesize', async(req, res) => { DbErrorBadRequest(`There is no available speech credential for ${vendor}${label ? ` and ${label}` : ''}`); } - let credentials = getSpeechCredential(speechCreds); + let credentials = getSpeechCredential(speechCreds, vendor, label); if (!credentials) { throw new - DbErrorBadRequest(`There is no available speech credential for ${vendor}${label ? ` and ${label}` : ''}`); + DbErrorBadRequest(`There is no available speech credential + for ${vendor}${label ? ` and ${label}` : ''} or tested`); } /* allow for microsoft custom region voice and api_key to be specified as an override */ if (vendor === 'microsoft' && options.deploymentId) {