diff --git a/services/discord-voice-bot/README.md b/services/discord-voice-bot/README.md index 5fb3a4cc..5e93c3b0 100644 --- a/services/discord-voice-bot/README.md +++ b/services/discord-voice-bot/README.md @@ -1,3 +1,32 @@ +# `discord-voice-bot` + +Allow アイリ to talk to you and many other users in Discord voice channels. + +## Usage + +``` +pnpm i +cp .env .env.local +``` + +Fill-in the following credentials as configurations: + +```shell +DISCORD_TOKEN='' +DISCORD_BOT_CLIENT_ID='' + +OPENAI_MODEL='' +OPENAI_API_KEY='' +OPENAI_API_BASE_URL='' + +ELEVENLABS_API_KEY='' +ELEVENLABS_API_BASE_URL='' +``` + +```shell +pnpm run -F @proj-airi/discord-voice-bot start +``` + ## Acknowledgements - Implementation of Audio handling and processing https://github.com/TheTrueSCP/CharacterAIVoice/blob/54d6a41b4e0eba9ad996c5f9ddcc6230277af2f8/src/VoiceHandler.js diff --git a/services/discord-voice-bot/src/utils/fs.ts b/services/discord-voice-bot/src/utils/fs.ts deleted file mode 100644 index 808bf619..00000000 --- a/services/discord-voice-bot/src/utils/fs.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { stat } from 'node:fs/promises' - -export async function exists(path: string) { - try { - await stat(path) - return true - } - catch (error) { - if (isENOENTError(error)) - return false - - throw error - } -} - -export function isENOENTError(error: unknown): boolean { - if (!(error instanceof Error)) - return false - if (!('code' in error)) - return false - if (error.code !== 'ENOENT') - return false - - return true -}