mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-10-09 21:14:00 +00:00
fix: update custom stt/tss url
This commit is contained in:
@@ -86,6 +86,14 @@ SpeechCredential.fields = [
|
|||||||
{
|
{
|
||||||
name: 'last_tested',
|
name: 'last_tested',
|
||||||
type: 'date'
|
type: 'date'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'custom_tts_url',
|
||||||
|
type: 'date'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'custom_stt_url',
|
||||||
|
type: 'date'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -343,7 +343,8 @@ router.put('/:sid', async(req, res) => {
|
|||||||
const sid = req.params.sid;
|
const sid = req.params.sid;
|
||||||
const logger = req.app.locals.logger;
|
const logger = req.app.locals.logger;
|
||||||
try {
|
try {
|
||||||
const {use_for_tts, use_for_stt, region, aws_region, stt_region, tts_region, riva_server_uri} = req.body;
|
const {use_for_tts, use_for_stt, region, aws_region, stt_region, tts_region,
|
||||||
|
riva_server_uri, custom_stt_url, custom_tts_url} = req.body;
|
||||||
if (typeof use_for_tts === 'undefined' && typeof use_for_stt === 'undefined') {
|
if (typeof use_for_tts === 'undefined' && typeof use_for_stt === 'undefined') {
|
||||||
throw new DbErrorUnprocessableRequest('use_for_tts and use_for_stt are the only updateable fields');
|
throw new DbErrorUnprocessableRequest('use_for_tts and use_for_stt are the only updateable fields');
|
||||||
}
|
}
|
||||||
@@ -379,7 +380,9 @@ router.put('/:sid', async(req, res) => {
|
|||||||
custom_stt_endpoint,
|
custom_stt_endpoint,
|
||||||
stt_region,
|
stt_region,
|
||||||
tts_region,
|
tts_region,
|
||||||
riva_server_uri
|
riva_server_uri,
|
||||||
|
custom_stt_url,
|
||||||
|
custom_tts_url
|
||||||
};
|
};
|
||||||
logger.info({o, newCred}, 'updating speech credential with this new credential');
|
logger.info({o, newCred}, 'updating speech credential with this new credential');
|
||||||
obj.credential = encryptCredential(newCred);
|
obj.credential = encryptCredential(newCred);
|
||||||
|
|||||||
Reference in New Issue
Block a user