mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-01-25 02:08:26 +00:00
rebase
This commit is contained in:
@@ -145,7 +145,7 @@ async function synthAudio(client, logger, stats, { account_sid,
|
||||
['microsoft', 'azure'].includes(vendor)
|
||||
) ||
|
||||
(
|
||||
process.env.JAMBONES_ELEVENLABS_STREAMING &&
|
||||
!process.env.JAMBONES_DISABLE_TTS_STREAMING &&
|
||||
vendor === 'elevenlabs'
|
||||
)
|
||||
) {
|
||||
@@ -615,7 +615,7 @@ const synthElevenlabs = async(logger, {credentials, options, stats, language, vo
|
||||
const {api_key, model_id, options: credOpts, use_streaming} = credentials;
|
||||
const opts = !!options && Object.keys(options).length !== 0 ? options : JSON.parse(credOpts || '{}');
|
||||
|
||||
/* if the env is set to stream then bag out, unless we are specifically rendering to generate a cache file */
|
||||
/* default to using the streaming interface, unless disabled by env var OR we want just a cache file */
|
||||
if (use_streaming && !renderForCaching) {
|
||||
let params = '';
|
||||
params += `{api_key=${api_key}`;
|
||||
@@ -629,7 +629,7 @@ const synthElevenlabs = async(logger, {credentials, options, stats, language, vo
|
||||
params += '}';
|
||||
|
||||
return {
|
||||
filePath: `say:${params}${text.replace(/\n/g, ' ')}`,
|
||||
filePath: `say:${params}${text.replace(/\n/g, ' ').replace(/\r/g, ' ')}`,
|
||||
servedFromCache: false,
|
||||
rtt: 0
|
||||
};
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@jambonz/speech-utils",
|
||||
"version": "0.0.38",
|
||||
"version": "0.0.41",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@jambonz/speech-utils",
|
||||
"version": "0.0.38",
|
||||
"version": "0.0.41",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-polly": "^3.496.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jambonz/speech-utils",
|
||||
"version": "0.0.38",
|
||||
"version": "0.0.41",
|
||||
"description": "TTS-related speech utilities for jambonz",
|
||||
"main": "index.js",
|
||||
"author": "Dave Horton",
|
||||
|
||||
Reference in New Issue
Block a user