mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-01-25 02:08:26 +00:00
support playht3.0
This commit is contained in:
@@ -816,14 +816,16 @@ const synthPlayHT = async(client, logger, {
|
||||
}
|
||||
|
||||
try {
|
||||
const post = bent('https://api.play.ht', 'POST', 'buffer', {
|
||||
'AUTHORIZATION': api_key,
|
||||
'X-USER-ID': user_id,
|
||||
const post = bent('POST', 'buffer', {
|
||||
...(voice_engine !== 'Play3.0' && {
|
||||
'AUTHORIZATION': api_key,
|
||||
'X-USER-ID': user_id,
|
||||
}),
|
||||
'Accept': 'audio/mpeg',
|
||||
'Content-Type': 'application/json'
|
||||
});
|
||||
|
||||
const mp3 = await post('/api/v2/tts/stream', {
|
||||
const mp3 = await post(synthesizeUrl, {
|
||||
text,
|
||||
voice,
|
||||
voice_engine,
|
||||
|
||||
Reference in New Issue
Block a user