support elevenlabs options (#553)

* support elevenlabs options

* elevenlabs options from synthezier

* wip

* fix
This commit is contained in:
Hoan Luu Huu
2023-11-30 21:28:12 +07:00
committed by GitHub
parent eb2d90ffaa
commit 0a0cbd57ba
5 changed files with 2250 additions and 23 deletions

View File

@@ -833,7 +833,8 @@ class CallSession extends Emitter {
} else if ('elevenlabs' === vendor) { } else if ('elevenlabs' === vendor) {
return { return {
api_key: credential.api_key, api_key: credential.api_key,
model_id: credential.model_id model_id: credential.model_id,
options: credential.options
}; };
} else if ('assemblyai' === vendor) { } else if ('assemblyai' === vendor) {
return { return {

View File

@@ -127,6 +127,7 @@ class TaskSay extends Task {
model, model,
salt, salt,
credentials, credentials,
options: this.options,
disableTtsCache : this.disableTtsCache disableTtsCache : this.disableTtsCache
}); });
this.logger.debug(`file ${filePath}, served from cache ${servedFromCache}`); this.logger.debug(`file ${filePath}, served from cache ${servedFromCache}`);

View File

@@ -91,6 +91,7 @@ const speechMapper = (cred) => {
const o = JSON.parse(decrypt(credential)); const o = JSON.parse(decrypt(credential));
obj.api_key = o.api_key; obj.api_key = o.api_key;
obj.model_id = o.model_id; obj.model_id = o.model_id;
obj.options = o.options;
} else if ('assemblyai' === obj.vendor) { } else if ('assemblyai' === obj.vendor) {
const o = JSON.parse(decrypt(credential)); const o = JSON.parse(decrypt(credential));
obj.api_key = o.api_key; obj.api_key = o.api_key;

2266
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,7 @@
"@jambonz/http-health-check": "^0.0.1", "@jambonz/http-health-check": "^0.0.1",
"@jambonz/mw-registrar": "^0.2.4", "@jambonz/mw-registrar": "^0.2.4",
"@jambonz/realtimedb-helpers": "^0.8.7", "@jambonz/realtimedb-helpers": "^0.8.7",
"@jambonz/speech-utils": "^0.0.26", "@jambonz/speech-utils": "^0.0.29",
"@jambonz/stats-collector": "^0.1.9", "@jambonz/stats-collector": "^0.1.9",
"@jambonz/time-series": "^0.2.8", "@jambonz/time-series": "^0.2.8",
"@jambonz/verb-specifications": "^0.0.46", "@jambonz/verb-specifications": "^0.0.46",