mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
feat: 支持调节vits的一些参数
This commit is contained in:
parent
59bec4e22a
commit
41ca23dc85
3 changed files with 34 additions and 1 deletions
|
|
@ -40,6 +40,9 @@ const defaultConfig = {
|
|||
defaultTimeoutMs: 120000,
|
||||
chromeTimeoutMS: 120000,
|
||||
ttsSpace: '',
|
||||
noiseScale: 0.6,
|
||||
noiseScaleW: 0.668,
|
||||
lengthScale: 1.2,
|
||||
version: 'v2.0.17'
|
||||
}
|
||||
const _path = process.cwd()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const newFetch = (url, options = {}) => {
|
|||
return fetch(url, mergedOptions)
|
||||
}
|
||||
const space = Config.ttsSpace
|
||||
export async function generateAudio (text, speaker = '琪亚娜', language = '中文', noiseScale = 0.6, noiseScaleW = 0.668, lengthScale = 1.2) {
|
||||
export async function generateAudio (text, speaker = '琪亚娜', language = '中文', noiseScale = Config.noiseScale, noiseScaleW = Config.noiseScaleW, lengthScale = Config.lengthScale) {
|
||||
logger.info(`正在使用${speaker},基于文本:'${text}'生成语音`)
|
||||
let body = {
|
||||
data: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue