mirror of
https://github.com/idootop/mi-gpt.git
synced 2024-09-20 06:45:38 +00:00
misc: set default TTS to xiaoai
This commit is contained in:
parent
0e56bdff35
commit
0f38e6b9cc
|
@ -62,7 +62,7 @@ export class BaseSpeaker {
|
||||||
|
|
||||||
async unWakeUp() {
|
async unWakeUp() {
|
||||||
// 通过 TTS 不发音文本,使小爱退出唤醒状态
|
// 通过 TTS 不发音文本,使小爱退出唤醒状态
|
||||||
await this.MiNA!.pause()
|
await this.MiNA!.pause();
|
||||||
await this.MiIOT!.doAction(5, 1, kAreYouOK);
|
await this.MiIOT!.doAction(5, 1, kAreYouOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +86,11 @@ export class BaseSpeaker {
|
||||||
tts = this.tts,
|
tts = this.tts,
|
||||||
} = options ?? {};
|
} = options ?? {};
|
||||||
|
|
||||||
|
const doubaoTTS = process.env.TTS_DOUBAO;
|
||||||
|
if (!doubaoTTS) {
|
||||||
|
tts = "xiaoai"; // 没有提供豆包语音接口时,只能使用小爱自带 TTS
|
||||||
|
}
|
||||||
|
|
||||||
const ttsNotXiaoai = (!!stream || !!text) && !audio && tts !== "xiaoai";
|
const ttsNotXiaoai = (!!stream || !!text) && !audio && tts !== "xiaoai";
|
||||||
playSFX = ttsNotXiaoai && playSFX;
|
playSFX = ttsNotXiaoai && playSFX;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user