mirror of
https://github.com/jambonz/speech-utils.git
synced 2025-12-19 03:37:49 +00:00
rimelabs support multiple model and languages
This commit is contained in:
@@ -926,7 +926,7 @@ const synthPlayHT = async(client, logger, {
|
||||
};
|
||||
|
||||
const synthRimelabs = async(logger, {
|
||||
credentials, options, stats, voice, text, renderForCaching, disableTtsStreaming
|
||||
credentials, options, stats, language, voice, text, renderForCaching, disableTtsStreaming
|
||||
}) => {
|
||||
const {api_key, model_id, options: credOpts} = credentials;
|
||||
const opts = !!options && Object.keys(options).length !== 0 ? options : JSON.parse(credOpts || '{}');
|
||||
@@ -937,6 +937,7 @@ const synthRimelabs = async(logger, {
|
||||
params += `{api_key=${api_key}`;
|
||||
params += `,model_id=${model_id}`;
|
||||
params += ',vendor=rimelabs';
|
||||
params += `,language=${language}`;
|
||||
params += `,voice=${voice}`;
|
||||
params += ',write_cache_file=1';
|
||||
if (opts.speedAlpha) params += `,speed_alpha=${opts.speedAlpha}`;
|
||||
@@ -962,6 +963,7 @@ const synthRimelabs = async(logger, {
|
||||
text,
|
||||
modelId: model_id,
|
||||
samplingRate: sampleRate,
|
||||
lang: language,
|
||||
...opts
|
||||
});
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user