a Discord bot that uses DECtalk text-to-speech
Project description
DECbot
A Discord bot that uses DECtalk text-to-speech (think Stephen Hawking or Moonbase Alpha).
DECbot uses wine and the original DECtalk say.exe
to synthesize text from text chat into a voice channel. The bot offers a set of
commands allowing users to control how and where DECbot synthesizes speech.
The bot can also take multiple commands at once, allowing multiple sounds and
voices to be played back at the same time.
Requirements
- Python 3
- wine
- A copy of the DECtalk executable and support. This includes
say.exe,dectalk.dll, and the dictionary,dtalk_us.dic.
Commands
DECbot can synthesize text into different voice channels depending on the
command:
!dec talk <text>plays the text back in the current voice channel.!dec tell <@mention> <text>plays the text back in the voice channel of the user mentioned.
The presence of DECbot can also be controlled (to minimize annoyance):
!dec quietstops the currently playing text immediately.!dec leaveforces the bot to leave its current voice channel.
Both TTS commands run using the "Perfect Paul" voice with phonemes enabled (so
the bot can "sing"). Additional options can be specified as they would in a
normal say.exe command: with brackets and a colon ([:command]). For example,
DECbot can talk as "Frail Frank" by starting the text with [:nf].
Installation
$ pip install decbot
The bot can also be run from source as a module. In the top level directory:
$ python -m decbot
Running
A new Discord bot must be set up before the application can be run:
- Create a new Discord application in the developer portal.
- Fill in the general information, and note the Client ID on this page.
- Set up your bot in the "Bot" tab. Note the Token on this page.
Next, to start the application:
-
Create a
DECbotconfiguration file. At minimum, this must have the bottoken, and the path to the DECtalk executable,tts.bin. -
Get an invite link (the
clientfield must be specified in the config):$ decbot --invite
-
Have the Discord server administrator add the bot. Note that it must be granted the ability to read and send text messages, and be able to view, join, and talk in voice channels.
-
Start the bot. The application looks for a configuration file in the same directory called
.decbot. Specify a different path as follows:$ decbot --config /path/to/my/config
-
To stop the bot, the application can be stopped from the command line, or the owner can issue
!dec quitin the Discord server chat.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file decbot-1.0.0.tar.gz.
File metadata
- Download URL: decbot-1.0.0.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
780abd06cfa3ab28a88fa8de7d1c64ca60b2d10a96f4659debfeb616a344eaef
|
|
| MD5 |
7c7306edd745faad55e3ff2e081d2b36
|
|
| BLAKE2b-256 |
575018006a9bb7afe2c6a1c70139164c3728a14c54888e08284f3b10476705af
|
File details
Details for the file decbot-1.0.0-py3-none-any.whl.
File metadata
- Download URL: decbot-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2174b5743f5b7b62a66975270bb1785998e20b6270acf045f81413c32da10b48
|
|
| MD5 |
2ad4bc44d3b77c38aee12b18d16f2032
|
|
| BLAKE2b-256 |
ba3b6c44aedd4094708b57a00b45f5ceb1c81c311e445c53acb4d5f68ad65d17
|