mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
feat: 支持调节vits的一些参数
This commit is contained in:
parent
59bec4e22a
commit
41ca23dc85
3 changed files with 34 additions and 1 deletions
|
|
@ -298,6 +298,36 @@ export function supportGuoba () {
|
||||||
label: '语音转换API地址',
|
label: '语音转换API地址',
|
||||||
bottomHelpMessage: '前往duplicate空间https://huggingface.co/spaces/ikechan8370/vits-uma-genshin-honkai后查看api地址',
|
bottomHelpMessage: '前往duplicate空间https://huggingface.co/spaces/ikechan8370/vits-uma-genshin-honkai后查看api地址',
|
||||||
component: 'Input'
|
component: 'Input'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'noiseScale',
|
||||||
|
label: 'noiseScale',
|
||||||
|
bottomHelpMessage: '控制情感变化程度',
|
||||||
|
component: 'InputNumber',
|
||||||
|
componentProps: {
|
||||||
|
min: 0,
|
||||||
|
max: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'noiseScaleW',
|
||||||
|
label: 'noiseScaleW',
|
||||||
|
bottomHelpMessage: '控制音素发音长度',
|
||||||
|
component: 'InputNumber',
|
||||||
|
componentProps: {
|
||||||
|
min: 0,
|
||||||
|
max: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'lengthScale',
|
||||||
|
label: 'lengthScale',
|
||||||
|
bottomHelpMessage: '控制整体语速',
|
||||||
|
component: 'InputNumber',
|
||||||
|
componentProps: {
|
||||||
|
min: 0,
|
||||||
|
max: 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 获取配置数据方法(用于前端填充显示数据)
|
// 获取配置数据方法(用于前端填充显示数据)
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,9 @@ const defaultConfig = {
|
||||||
defaultTimeoutMs: 120000,
|
defaultTimeoutMs: 120000,
|
||||||
chromeTimeoutMS: 120000,
|
chromeTimeoutMS: 120000,
|
||||||
ttsSpace: '',
|
ttsSpace: '',
|
||||||
|
noiseScale: 0.6,
|
||||||
|
noiseScaleW: 0.668,
|
||||||
|
lengthScale: 1.2,
|
||||||
version: 'v2.0.17'
|
version: 'v2.0.17'
|
||||||
}
|
}
|
||||||
const _path = process.cwd()
|
const _path = process.cwd()
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ const newFetch = (url, options = {}) => {
|
||||||
return fetch(url, mergedOptions)
|
return fetch(url, mergedOptions)
|
||||||
}
|
}
|
||||||
const space = Config.ttsSpace
|
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}'生成语音`)
|
logger.info(`正在使用${speaker},基于文本:'${text}'生成语音`)
|
||||||
let body = {
|
let body = {
|
||||||
data: [
|
data: [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue