Urgent.News

What's breaking now, across hundreds of outlets.

AI

Adding AI Voice to Discord Bots

Why Add AI Voice to Your Discord Bot? Discord is already a hub for real‑time chat, gaming, and community building. Adding a voice component turns a text‑only bot into a more immersive experience—think automated announcements, dynamic NPC dialogue, or even a personal AI companion that can read messages out loud. With modern text‑to‑speech (TTS) services, you can generate natural‑sounding speech on…

To bring a Discord bot to life with voice capabilities, start by adding a fundamental bot that can connect to a voice channel and play an audio file. In the `bot.py` file, import the necessary modules, create the bot object, and define event handlers for joining and leaving voice channels.

Next, integrate ElevenLabs' text-to-speech service to enable the bot to speak. This requires obtaining an API key from the ElevenLabs website, setting it as an environment variable, and selecting a voice ID. Create a helper function called `synthesize_speech()` that takes the desired text and voice ID as parameters. This function sends a POST request to ElevenLabs' TTS endpoint, passing the text, model ID, and custom voice settings. The function returns the MP3 bytes of the synthesized speech.

Finally, add a new command to the bot that utilizes the `synthesize_speech()` function to convert text input into spoken audio. When a user types the command followed by the desired text, the bot connects to a voice channel, synthesizes the speech, and plays the MP3 file. With this setup, your Discord bot can now communicate in a more engaging and human-like manner, enhancing the overall user experience for your community.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in AI

Overview of the google-labs-code/stitch-skills library

What is google-labs-code/stitch-skills is a library of skills for code agents that works together with the Stitch MCP server.

  • Google-labs-code/stitch-skills library for code agents
  • Provides skills like design, build, utilities
  • Enables tasks like creating screens and converting code

PH, French forces hold maritime exercises in Sulu Sea

MANILA, Philippines — A Philippine Coast Guard (PCG) patrol ship that helped monitor a Chinese aircraft carrier strike group in the Sulu Sea last month has joined French and Philippine naval forces in…

  • BRP Sarangani, a Philippine Coast Guard vessel, participated in maritime exercises.
  • Exercises conducted from November 20 to 22, 2026, in the Sulu Sea.
  • France and Philippines showcased operational cooperation in shared maritime security.

I Checked My Agent Setup Against Lydia Hallie's 'Rethinking Claude Code Best Practices': 5 Matches, 3 Gaps, 1 Detour

Lydia Hallie from the Claude Code team at Anthropic gave a talk called "Rethinking Claude Code Best Practices" (ai.engineer, about 17 minutes).

  • Five of Lydia Hallie's recommendations align with your current practices
  • Three gaps identified in your setup: deny rules, deny rule enforcement, network access model
  • Your setup includes restrictive network access due to hardware-based cluster requirements

How AI is Reshaping Thailand’s Jobs and Workforce

BANGKOK – Which parts of work are changing in Thailand, and how can you prepare? AI can speed up routine tasks, shift job duties, and increase demand for new skills, but exposure to AI doesn’t…

  • 72% of Thai workers use AI for work in the past year
  • 24% of respondents used generative AI daily in 2025
  • Thailand needs 1,087,548 high-skilled workers in 5 years

Thailand Faces Falling Births, Aging and AI Skills Gap

BANGKOK — Thailand is colliding with a rare economic double bind as a rapidly shrinking birth rate meets an accelerating wave of workplace automation, threatening to hollow out Southeast Asia’s…

  • Thailand's total fertility rate at 1.0 child per woman
  • Over 20% of population aged 60 and older
  • Aging population projected to reach 30% by 2030

More from Saturday, 28 November 2026 →