Skip to content

Commit

Permalink
update speech version (#485)
Browse files Browse the repository at this point in the history
* update speech version

* create elevenlabs credential for synthesis

* create elevenlabs credential for synthesis
  • Loading branch information
xquanluu authored Oct 14, 2023
1 parent a92ea9c commit 320baf4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
8 changes: 6 additions & 2 deletions lib/session/call-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,12 @@ class CallSession extends Emitter {
speech_credential_sid: credential.speech_credential_sid,
cobalt_server_uri: credential.cobalt_server_uri
};
}
else if (vendor.startsWith('custom:')) {
} else if ('elevenlabs' === vendor) {
return {
api_key: credential.api_key,
model_id: credential.model_id
};
} else if (vendor.startsWith('custom:')) {
return {
speech_credential_sid: credential.speech_credential_sid,
auth_token: credential.auth_token,
Expand Down
7 changes: 5 additions & 2 deletions lib/utils/db-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ const speechMapper = (cred) => {
else if ('cobalt' === obj.vendor) {
const o = JSON.parse(decrypt(credential));
obj.cobalt_server_uri = o.cobalt_server_uri;
}
else if (obj.vendor.startsWith('custom:')) {
} else if ('elevenlabs' === obj.vendor) {
const o = JSON.parse(decrypt(credential));
obj.api_key = o.api_key;
obj.model_id = o.model_id;
} else if (obj.vendor.startsWith('custom:')) {
const o = JSON.parse(decrypt(credential));
obj.auth_token = o.auth_token;
obj.custom_stt_url = o.custom_stt_url;
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@jambonz/db-helpers": "^0.9.1",
"@jambonz/http-health-check": "^0.0.1",
"@jambonz/realtimedb-helpers": "^0.8.6",
"@jambonz/speech-utils": "^0.0.21",
"@jambonz/speech-utils": "^0.0.22",
"@jambonz/stats-collector": "^0.1.9",
"@jambonz/time-series": "^0.2.8",
"@jambonz/verb-specifications": "^0.0.37",
Expand Down

0 comments on commit 320baf4

Please sign in to comment.