Skip to content

Commit

Permalink
update elevenlab model
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Jul 24, 2024
1 parent 48e1a72 commit 58cc9f2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/routes/api/voip-carriers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@ const { parseVoipCarrierSid } = require('./utils');
const validate = async(req) => {
const {lookupAppBySid, lookupAccountBySid} = req.app.locals;

// If user is not admin, override service_provider_sid
if (req.user.service_provider_sid) {
req.body.service_provider_sid = req.user.service_provider_sid;
}
/* account level user can only act on carriers associated to his/her account */
if (req.user.hasAccountAuth) {
req.body.account_sid = req.user.account_sid;
}

// only case admin create carrier but forget service_provider_sid
if (!req.body.service_provider_sid) {
throw new DbErrorBadRequest('service_provider_sid missing');
}
if (req.body.application_sid && !req.body.account_sid) {
throw new DbErrorBadRequest('account_sid missing');
}
Expand Down
2 changes: 2 additions & 0 deletions lib/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,8 @@ paths:
description:
type: string
example: my US sip trunking provider
service_provider_sid:
type: string
account_sid:
type: string
application_sid:
Expand Down
1 change: 1 addition & 0 deletions lib/utils/speech-data/tts-model-elevenlabs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = [
{ name: 'Turbo v2', value: 'eleven_turbo_v2' },
{ name: 'Turbo v2.5', value: 'eleven_turbo_v2_5' },
{ name: 'Multilingual v2', value: 'eleven_multilingual_v2' },
{ name: 'Multilingual v1', value: 'eleven_multilingual_v1' },
{ name: 'English v1', value: 'eleven_monolingual_v1' },
Expand Down

0 comments on commit 58cc9f2

Please sign in to comment.