Comments (14)
No worries! Did you install the dependencies from requirements.txt
? The script requires a fork of discord.py with voice support. You can install it manually with: pip install git+https://github.com/Sheepposu/discord.py@voice-receive
from llmchat.
Looks like that solved that problem, thank you! I just tried testing the bot using the "/info" command within the Discord server. I'm getting the below error message and in Discord it's saying the bot is not responding.
Any ideas/help with this?
[04-24 18:47:01] [tree.py:798] ERROR - Ignoring exception in command 'info'
Traceback (most recent call last):
File "/usr/local/python/3.10.4/lib/python3.10/configparser.py", line 790, in get
value = d[option]
File "/usr/local/python/3.10.4/lib/python3.10/collections/__init__.py", line 986, in __getitem__
return self.__missing__(key) # support subclasses that define __missing__
File "/usr/local/python/3.10.4/lib/python3.10/collections/__init__.py", line 978, in __missing__
raise KeyError(key)
KeyError: 'reminder'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/python/3.10.4/lib/python3.10/site-packages/discord/app_commands/commands.py", line 841, in _do_call
return await self._callback(self.binding, interaction, **params) # type: ignore
File "/workspaces/Discord-Chatbot/llmchat/client.py", line 286, in print_info
value=self.config.bot_reminder if self.config.bot_reminder is not None else "*Not set!*",
File "/workspaces/Discord-Chatbot/llmchat/config.py", line 214, in bot_reminder
return self._config.get("Bot", "reminder")
File "/usr/local/python/3.10.4/lib/python3.10/configparser.py", line 793, in get
raise NoOptionError(option, section)
configparser.NoOptionError: No option 'reminder' in section: 'Bot'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/python/3.10.4/lib/python3.10/site-packages/discord/app_commands/tree.py", line 1248, in _call
await command._invoke_with_namespace(interaction, namespace)
File "/usr/local/python/3.10.4/lib/python3.10/site-packages/discord/app_commands/commands.py", line 867, in _invoke_with_namespace
return await self._do_call(interaction, transformed_values)
File "/usr/local/python/3.10.4/lib/python3.10/site-packages/discord/app_commands/commands.py", line 860, in _do_call
raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'info' raised an exception: NoOptionError: No option 'reminder' in section: 'Bot'
from llmchat.
Ah yes, this is a bug with the config parser. I'll push an update soon to fix this, but for now you can add reminder =
in the [Bot]
category and the error should go away.
from llmchat.
Awesome! Your fixes have worked, thank you again.
The (hopefully) last issue I'm running into is that the voice Discord is reading responses in is still the default Discord TTS voice and not the Eleven Labs voice I have created. I've added my Eleven Labs API key as well as the voice ID for the voice I want to use but that hasn't seemed to work.
Is there another configuration I have missed?
from llmchat.
The ElevenLabs TTS doesn't replace the default discord tts, you have to join a voice channel and the bot will join after you. If you want the bot to just read its replies and ignore your voice, set Bot.audiobook_mode
to true
. :) Let me know if that works for you!
from llmchat.
Oh ok got it. Sorry, misunderstood how it worked!
I've got the bot responding to messages, but it's still not using my Eleven Labs voice. I think it may have to do with this error I'm seeing when I install the requirements.txt.
Building wheels for collected packages: PyAudio
Building wheel for PyAudio (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for PyAudio (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/pyaudio
copying src/pyaudio/__init__.py -> build/lib.linux-x86_64-cpython-310/pyaudio
running build_ext
building 'pyaudio._portaudio' extension
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/src
creating build/temp.linux-x86_64-cpython-310/src/pyaudio
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -I/usr/include -I/usr/local/python/3.10.4/include/python3.10 -c src/pyaudio/device_api.c -o build/temp.linux-x86_64-cpython-310/src/pyaudio/device_api.o
src/pyaudio/device_api.c:9:10: fatal error: portaudio.h: No such file or directory
9 | #include "portaudio.h"
| ^~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for PyAudio
Failed to build PyAudio
ERROR: Could not build wheels for PyAudio, which is required to install pyproject.toml-based projects
I've been trying a bunch of different fixes I've found online but no luck. Any guidance?
from llmchat.
Since you're on linux, you have to install portaudio19-dev
using your package manager and it should work after :) It's a dependency of pyaudio
from llmchat.
Weird, I'm on Windows 10. Do you know why that error is being thrown since I'm not on Linux?
from llmchat.
Weird, I'm on Windows 10. Do you know why that error is being thrown since I'm not on Linux?
Wait really? Are you using WSL?
from llmchat.
Negative. Vanilla Windows 10, running the code through Github Codespaces. Could that have something to do with it? Should I try running the code using a different environment?
from llmchat.
Ah yes that would be it, I'm pretty sure they run Linux. If you can install portaudio19-dev
on the codespaces machine that should fix the error, or you can clone it locally and try running it on your Windows 10 machine
from llmchat.
Running it locally has fixed that issue! I've got the bot working correctly in audiobook mode on a private Discord server.
Two things I've faced now that it's responding:
- I haven't been able to get it to respond to my voice (assuming it's supposed to based on my understanding of your documentation). I've tried different microphones and have given the bot basically every permission in Discord.
- The Discord default TTS voice is playing overtop of the ElevenLabs voice. I've disabled TTS readouts in Discord's accessibility settings, but the robotic TTS voice is still playing.
Any ideas about those two points?
from llmchat.
@hc20k Disregard the second question, I figured that one out. Turns out there's a separate setting in Discord to enable TTS for notifications, which is what was being triggered.
from llmchat.
Running it locally has fixed that issue! I've got the bot working correctly in audiobook mode on a private Discord server.
Two things I've faced now that it's responding:
- I haven't been able to get it to respond to my voice (assuming it's supposed to based on my understanding of your documentation). I've tried different microphones and have given the bot basically every permission in Discord.
- The Discord default TTS voice is playing overtop of the ElevenLabs voice. I've disabled TTS readouts in Discord's accessibility settings, but the robotic TTS voice is still playing.
Any ideas about those two points?
Hmm, for your first issue, which TTS service are you using? I find that whisper works really well compared to google.
from llmchat.
Related Issues (20)
- no reminder value in config.example.ini HOT 1
- {date} value in prompts? HOT 2
- /purgememory command? HOT 2
- Failed to build PyAudio HOT 4
- PyNaCl library needed but already installed HOT 1
- Toggle Audiobook mode via Discord /command HOT 3
- error loading model: failed to open models/llama/Drararara_llama-13B-ggml: Permission denied HOT 4
- Commands to switch the system/reminder values to different prompts would be really neat
- Is there a way to have it only respond if you say a certain word first? HOT 2
- Error HOT 1
- ModuleNotFoundError: No module named 'discord' HOT 4
- Discord Audio Client error
- Exception thrown while trying to generate message: string indices must be integers HOT 2
- Runtime issue: module 'openai' has no attribute 'aiosession' HOT 3
- silero.py dependency gives error on os.mkdir("models/torch") if dir does not exist
- Random trashy output
- Crash when two messages are sent before input is generated
- Voice Channel Connection Error HOT 1
- AttributeError: module 'discord' has no attribute 'AudioSink'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llmchat.