Co-authored-by: yysforget@163.com <yysforget@163.com>
This commit is contained in:
yysforget 2023-03-16 16:15:47 +08:00 committed by GitHub
parent b212fcf87e
commit ae1663560f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,8 +50,8 @@ export async function generateAudio (text, speaker = '随机', language = '中
]
}
let space = Config.ttsSpace
if (space.endsWith('api/generate')) {
let trimmedSpace = _.trimEnd(space, '/api/generate')
if (space.endsWith('/api/generate')) {
let trimmedSpace = space.substring(0, space.length - 13)
logger.warn(`vits api 当前为${space},已校正为${trimmedSpace}`)
space = trimmedSpace
}