a Discord bot that uses DECtalk text-to-speech
A Discord bot that uses DECtalk text-to-speech (think Stephen Hawking or Moonbase Alpha).
DECbot uses wine and the original DECtalk
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.
- Python 3
- A copy of the DECtalk executable and support. This includes
dectalk.dll, and the dictionary,
DECbot can synthesize text into different voice channels depending on the
!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
say.exe command: with brackets and a colon (
[:command]). For example,
DECbot can talk as "Frail Frank" by starting the text with
$ pip install decbot
The bot can also be run from source as a module. In the top level directory:
$ python -m decbot
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:
DECbotconfiguration file. At minimum, this must have the bot
token, and the path to the DECtalk executable,
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.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size decbot-1.0.0-py3-none-any.whl (15.1 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size decbot-1.0.0.tar.gz (11.5 kB)||File type Source||Python version None||Upload date||Hashes View|