Giter Site home page Giter Site logo

TTS Not playing any sound about discord-tts HOT 19 CLOSED

mundoex avatar mundoex commented on August 13, 2024
TTS Not playing any sound

from discord-tts.

Comments (19)

ExpErgio avatar ExpErgio commented on August 13, 2024 6

I've tried it, and it works. But I have found a bug: if you want the bot to play only one word, it doesn't; at least in Spanish, I don't know if the same thing happens in other languages.

This, works:

let voiceChannel = message.member.voice.channel;

voiceChannel.join().then(connection => {
      const stream = discordTTS.getVoiceStream("me gusta el bizcocho", {lang:"es"});
      const dispatcher = connection.play(stream);
      dispatcher.on("finish",() => voiceChannel.leave());
    });

This, doesn´t work:

let voiceChannel = message.member.voice.channel;

voiceChannel.join().then(connection => {
      const stream = discordTTS.getVoiceStream("hola", {lang:"es"});
      const dispatcher = connection.play(stream);
      dispatcher.on("finish",() => voiceChannel.leave());
    });

from discord-tts.

mundoex avatar mundoex commented on August 13, 2024 5

i will be taking a look at it ty
google now requires a recaptcha to get the sound stream not sure how to bypass that

from discord-tts.

dev-brendanprice avatar dev-brendanprice commented on August 13, 2024 1

I can confirm that this is still happening.

"discord-tts": "^1.2.0",
"discord.js": "^12.5.3",
node -v
v16.4.0

from discord-tts.

ExpErgio avatar ExpErgio commented on August 13, 2024

I have the same problem. 1 month ago, it works perfectly, but since 1 week, it doesnt play any sound

from discord-tts.

mundoex avatar mundoex commented on August 13, 2024

i will be taking a look at it ty

from discord-tts.

ExpErgio avatar ExpErgio commented on August 13, 2024

You have our full support. Hopefully you can solve it; it is a very useful resource that we all appreciate. Great job.

from discord-tts.

mundoex avatar mundoex commented on August 13, 2024

You have our full support. Hopefully you can solve it; it is a very useful resource that we all appreciate. Great job.

Update to new version 1.2. should be playing audio again :)

from discord-tts.

MrBartusek avatar MrBartusek commented on August 13, 2024

Hey @mundoex It's seams like that it's still isn't working

from discord-tts.

mundoex avatar mundoex commented on August 13, 2024

Hey @mundoex It's seams like that it's still isn't working

I tested it and it worked for me, are you getting any error or anything so i can try help?

from discord-tts.

TheSlow avatar TheSlow commented on August 13, 2024

Hey @mundoex It's seams like that it's still isn't working

I tested it and it worked for me, are you getting any error or anything so i can try help?

Works for me after the last update as well.

from discord-tts.

MrBartusek avatar MrBartusek commented on August 13, 2024

@mundoex Bot just joins the channel and doesn't play any sound. This is exactly the same behaviour as it was in 1.1

const languageCode = "en-US"

const connection = await message.member.voice.channel.join();
connection.play(discordTTS.getVoiceStream(text, languageCode), { volume: 6 })
    .on('finish', () => connection.disconnect());
"@discordjs/opus": "^0.3.3",
"discord-tts": "^1.2.0",
"discord.js": "^12.3.1",
"ffmpeg-static": "^4.2.7",

from discord-tts.

mundoex avatar mundoex commented on August 13, 2024

give this a try

connection.play(discordTTS.getVoiceStream(text, { lang: languageCode }), { volume: 6 })

from discord-tts.

MrBartusek avatar MrBartusek commented on August 13, 2024

@mundoex That gave error

Error: lang "en-US" might not exist
    at C:\***\node_modules\google-tts-api\dist\getAudioBase64.js:91:31

Which I fixed by changing it to en. However it still don't play anything

from discord-tts.

mundoex avatar mundoex commented on August 13, 2024

@mundoex That gave error

Error: lang "en-US" might not exist
    at C:\***\node_modules\google-tts-api\dist\getAudioBase64.js:91:31

Which I fixed by changing it to en. However it still don't play anything

try with just "en"

from discord-tts.

mundoex avatar mundoex commented on August 13, 2024

@mundoex That gave error

Error: lang "en-US" might not exist
    at C:\***\node_modules\google-tts-api\dist\getAudioBase64.js:91:31

Which I fixed by changing it to en. However it still don't play anything

would it be ok if i added you on discord to try and help?

from discord-tts.

MrBartusek avatar MrBartusek commented on August 13, 2024

@mundoex I just ran I today and it started working, not sure what caused it. Anyways, thanks for the help!

from discord-tts.

ExpErgio avatar ExpErgio commented on August 13, 2024

I have the same problem, doesn't play any sound.

let voiceChannel = message.member.voice.channel;

voiceChannel.join().then(connection => {
      const stream = discordTTS.getVoiceStream("hola, estoy probando", "es-ES");
      const dispatcher = connection.play(stream);
      dispatcher.on("finish",() => voiceChannel.leave());
    });

And I have the last version (1.2.0)

from discord-tts.

mundoex avatar mundoex commented on August 13, 2024

I have the same problem, doesn't play any sound.

let voiceChannel = message.member.voice.channel;

voiceChannel.join().then(connection => {
      const stream = discordTTS.getVoiceStream("hola, estoy probando", {lang:"es"});
      const dispatcher = connection.play(stream);
      dispatcher.on("finish",() => voiceChannel.leave());
    });

And I have the last version (1.2.0)

I have the same problem, doesn't play any sound.

let voiceChannel = message.member.voice.channel;

voiceChannel.join().then(connection => {
      const stream = discordTTS.getVoiceStream("hola, estoy probando", "es-ES");
      const dispatcher = connection.play(stream);
      dispatcher.on("finish",() => voiceChannel.leave());
    });

And I have the last version (1.2.0)

const stream = discordTTS.getVoiceStream("hola, estoy probando", {lang:"es"});

from discord-tts.

leonardofel avatar leonardofel commented on August 13, 2024

I've tried it, and it works. But I have found a bug: if you want the bot to play only one word, it doesn't; at least in Spanish, I don't know if the same thing happens in other languages.

This, works:

let voiceChannel = message.member.voice.channel;

voiceChannel.join().then(connection => {
      const stream = discordTTS.getVoiceStream("me gusta el bizcocho", {lang:"es"});
      const dispatcher = connection.play(stream);
      dispatcher.on("finish",() => voiceChannel.leave());
    });

This, doesn´t work:

let voiceChannel = message.member.voice.channel;

voiceChannel.join().then(connection => {
      const stream = discordTTS.getVoiceStream("hola", {lang:"es"});
      const dispatcher = connection.play(stream);
      dispatcher.on("finish",() => voiceChannel.leave());
    });

I was able to workaround the cut off, see: #19 (comment)

from discord-tts.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.