@jambonz/speech-utils 0.2.25 → 0.2.26
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/.github/workflows/ci.yml +1 -1
- package/lib/synth-audio.js +11 -3
- package/package.json +2 -2
package/.github/workflows/ci.yml
CHANGED
package/lib/synth-audio.js
CHANGED
|
@@ -1316,6 +1316,7 @@ const synthCartesia = async(logger, {
|
|
|
1316
1316
|
if (embedding) params += `,embedding=${embedding}`;
|
|
1317
1317
|
if (opts.speed) params += `,speed=${opts.speed}`;
|
|
1318
1318
|
if (opts.emotion) params += `,emotion=${opts.emotion}`;
|
|
1319
|
+
if (opts.volume) params += `,volume=${opts.volume}`;
|
|
1319
1320
|
params += '}';
|
|
1320
1321
|
|
|
1321
1322
|
return {
|
|
@@ -1341,13 +1342,20 @@ const synthCartesia = async(logger, {
|
|
|
1341
1342
|
id: voice
|
|
1342
1343
|
}
|
|
1343
1344
|
),
|
|
1344
|
-
...(opts.speed || opts.emotion && {
|
|
1345
|
+
...(model_id === 'sonic-2' && (opts.speed || opts.emotion) && {
|
|
1345
1346
|
experimentalControls: {
|
|
1346
1347
|
...(opts.speed !== null && opts.speed !== undefined && {speed: opts.speed}),
|
|
1347
|
-
...(opts.emotion && {emotion: opts.emotion}),
|
|
1348
|
+
...(opts.emotion && {emotion: [opts.emotion]}),
|
|
1348
1349
|
}
|
|
1349
|
-
})
|
|
1350
|
+
}),
|
|
1350
1351
|
},
|
|
1352
|
+
...(model_id === 'sonic-3' && (opts.speed || opts.emotion || opts.volume) && {
|
|
1353
|
+
generationConfig: {
|
|
1354
|
+
...(opts.volume !== null && opts.volume !== undefined && {volume: opts.volume}),
|
|
1355
|
+
...(opts.speed !== null && opts.speed !== undefined && {speed: opts.speed}),
|
|
1356
|
+
...(opts.emotion !== null && opts.emotion !== undefined && {emotion: opts.emotion}),
|
|
1357
|
+
}
|
|
1358
|
+
}),
|
|
1351
1359
|
language: language,
|
|
1352
1360
|
outputFormat: {
|
|
1353
1361
|
container: 'mp3',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jambonz/speech-utils",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.26",
|
|
4
4
|
"description": "TTS-related speech utilities for jambonz",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Dave Horton",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"23": "^0.0.0",
|
|
30
30
|
"@aws-sdk/client-polly": "^3.496.0",
|
|
31
31
|
"@aws-sdk/client-sts": "^3.496.0",
|
|
32
|
-
"@cartesia/cartesia-js": "^2.
|
|
32
|
+
"@cartesia/cartesia-js": "^2.2.7",
|
|
33
33
|
"@google-cloud/text-to-speech": "^5.5.0",
|
|
34
34
|
"@grpc/grpc-js": "^1.9.14",
|
|
35
35
|
"@jambonz/realtimedb-helpers": "^0.8.7",
|