mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: tts role
This commit is contained in:
parent
d52f95780a
commit
de8cc48156
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { AbstractTool } from './AbstractTool.js'
|
||||
import { generateAudio } from '../tts.js'
|
||||
import {convertSpeaker, generateAudio} from '../tts.js'
|
||||
import uploadRecord from '../uploadRecord.js'
|
||||
import { Config } from '../config.js'
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ export class TTSTool extends AbstractTool {
|
|||
let { text, role, groupId } = opts
|
||||
groupId = parseInt(groupId.trim())
|
||||
try {
|
||||
let wav = await generateAudio(text, role, '中日混合(中文用[ZH][ZH]包裹起来,日文用[JA][JA]包裹起来)')
|
||||
let wav = await generateAudio(text, convertSpeaker(role), '中日混合(中文用[ZH][ZH]包裹起来,日文用[JA][JA]包裹起来)')
|
||||
let sendable = await uploadRecord(wav, Config.ttsMode)
|
||||
if (sendable) {
|
||||
let group = await Bot.pickGroup(groupId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue