mirror of
https://github.com/jambonz/speech-utils.git
synced 2025-12-19 03:37:49 +00:00
wip
This commit is contained in:
@@ -1342,13 +1342,20 @@ const synthCartesia = async(logger, {
|
||||
id: voice
|
||||
}
|
||||
),
|
||||
...(opts.speed || opts.emotion && {
|
||||
...(model_id === 'sonic-2' && (opts.speed || opts.emotion) && {
|
||||
experimentalControls: {
|
||||
...(opts.speed !== null && opts.speed !== undefined && {speed: opts.speed}),
|
||||
...(opts.emotion && {emotion: opts.emotion}),
|
||||
}
|
||||
})
|
||||
}),
|
||||
},
|
||||
...(model_id === 'sonic-3' && (opts.speed || opts.emotion || opts.volume) && {
|
||||
generationConfig: {
|
||||
...(opts.volume !== null && opts.volume !== undefined && {volume: opts.volume}),
|
||||
...(opts.speed !== null && opts.speed !== undefined && {speed: opts.speed}),
|
||||
...(opts.emotion !== null && opts.emotion !== undefined && {emotion: opts.emotion}),
|
||||
}
|
||||
}),
|
||||
language: language,
|
||||
outputFormat: {
|
||||
container: 'mp3',
|
||||
|
||||
Reference in New Issue
Block a user