Skip to content

Commit

Permalink
fixed playht3.0 cannot be played if credential is cached
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Oct 11, 2024
1 parent c18fbac commit 31a0c7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/synth-audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,9 @@ const synthPlayHT = async(client, logger, {
synthesizeUrl = inference_address;
const expiry = Math.floor((expires_at_ms - Date.now()) / 1000 - 30);
await client.set(key, inference_address, 'EX', expiry);
} else {
// Use cached URL
synthesizeUrl = url;
}
} catch (err) {
logger.info({err}, 'synth PlayHT returned error for authentication version 3.0');
Expand Down

0 comments on commit 31a0c7b

Please sign in to comment.