mirror of
https://github.com/idootop/mi-gpt.git
synced 2025-04-06 20:47:29 +00:00
chore: 更新 .env.example 文件
This commit is contained in:
parent
5ff8771b47
commit
d91d514a46
20
.env.example
20
.env.example
|
@ -1,18 +1,14 @@
|
|||
# Mi Services
|
||||
MI_USER="小米账号"
|
||||
MI_PASS="账号密码"
|
||||
MI_DID="小爱音箱设备 ID 或在米家 APP 种设置的设备名称"
|
||||
|
||||
# OpenAI
|
||||
# OpenAI(也支持通义千问、MoonShot、DeepSeek 等模型参数)
|
||||
OPENAI_MODEL=gpt-4o
|
||||
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxx
|
||||
OPENAI_BASE_URL=https://api.openai.com/v1
|
||||
|
||||
# 提示音效(可选)
|
||||
# AUDIO_SILENT=静音音频链接
|
||||
# AUDIO_BEEP=默认提示音链接
|
||||
# AUDIO_ACTIVE=唤醒提示音链接
|
||||
# AUDIO_ERROR=出错了提示音链接
|
||||
# 提示音效(可选,一般不用填,你也可以换上自己的提示音链接试试看效果)
|
||||
# AUDIO_SILENT=静音音频链接,示例:https://example.com/slient.wav
|
||||
# AUDIO_BEEP=默认提示音链接,同上
|
||||
# AUDIO_ACTIVE=唤醒提示音链接,同上
|
||||
# AUDIO_ERROR=出错了提示音链接,同上
|
||||
|
||||
# Doubao TTS(可选)
|
||||
# Doubao TTS(可选,用于调用第三方 TTS 服务,比如:豆包)
|
||||
# TTS_DOUBAO=豆包 TTS 接口
|
||||
# SPEAKERS_DOUBAO=豆包 TTS 音色列表接口
|
|
@ -63,9 +63,9 @@ import { MiGPT } from "mi-gpt";
|
|||
async function main() {
|
||||
const client = MiGPT.create({
|
||||
speaker: {
|
||||
userId: process.env.MI_USER,
|
||||
password: process.env.MI_PASS,
|
||||
did: process.env.MI_DID,
|
||||
userId: "944123456", // 注意:不是手机号或邮箱,请在「个人信息」-「小米 ID」查看
|
||||
password: "123456", // 账号密码
|
||||
did: "小爱音箱Pro", // 小爱音箱 ID 或在米家中设置的名称
|
||||
},
|
||||
});
|
||||
await client.start();
|
||||
|
|
|
@ -81,7 +81,7 @@ export class BaseSpeaker {
|
|||
playingCommand,
|
||||
ttsCommand = [5, 1],
|
||||
wakeUpCommand = [5, 3],
|
||||
audioBeep = process.env.audioBeep,
|
||||
audioBeep = process.env.AUDIO_BEEP,
|
||||
} = config;
|
||||
this.debug = debug;
|
||||
this.audioBeep = audioBeep;
|
||||
|
|
|
@ -55,7 +55,7 @@ export class Speaker extends BaseSpeaker {
|
|||
const {
|
||||
heartbeat = 1000,
|
||||
exitKeepAliveAfter = 30,
|
||||
audioSilent = process.env.audioSilent,
|
||||
audioSilent = process.env.AUDIO_SILENT,
|
||||
} = config;
|
||||
this.audioSilent = audioSilent;
|
||||
this._commands = config.commands ?? [];
|
||||
|
|
Loading…
Reference in New Issue
Block a user