mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-01-25 02:08:26 +00:00
add top_p and repetition_penalty to playht3.0
This commit is contained in:
@@ -764,8 +764,7 @@ const synthPlayHT = async(client, logger, {
|
||||
|
||||
let synthesizeUrl = 'https://api.play.ht/api/v2/tts/stream';
|
||||
|
||||
// If model is play3.0, the stream url is provided by v3 auth endpoint which is
|
||||
// including jwt token as request params.
|
||||
// If model is play3.0, the synthesizeUrl is got from authentication endpoint
|
||||
if (voice_engine === 'Play3.0') {
|
||||
try {
|
||||
const post = bent('https://api.play.ht', 'POST', 'json', 201, {
|
||||
@@ -806,6 +805,8 @@ const synthPlayHT = async(client, logger, {
|
||||
if (opts.voice_guidance) params += `,voice_guidance=${opts.voice_guidance}`;
|
||||
if (opts.style_guidance) params += `,style_guidance=${opts.style_guidance}`;
|
||||
if (opts.text_guidance) params += `,text_guidance=${opts.text_guidance}`;
|
||||
if (opts.top_p) params += `,top_p=${opts.top_p}`;
|
||||
if (opts.repetition_penalty) params += `,repetition_penalty=${opts.repetition_penalty}`;
|
||||
params += '}';
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user