@jambonz/speech-utils 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/synth-audio.js +3 -0
- package/package.json +1 -1
package/lib/synth-audio.js
CHANGED
|
@@ -779,6 +779,9 @@ const synthPlayHT = async(client, logger, {
|
|
|
779
779
|
synthesizeUrl = inference_address;
|
|
780
780
|
const expiry = Math.floor((expires_at_ms - Date.now()) / 1000 - 30);
|
|
781
781
|
await client.set(key, inference_address, 'EX', expiry);
|
|
782
|
+
} else {
|
|
783
|
+
// Use cached URL
|
|
784
|
+
synthesizeUrl = url;
|
|
782
785
|
}
|
|
783
786
|
} catch (err) {
|
|
784
787
|
logger.info({err}, 'synth PlayHT returned error for authentication version 3.0');
|