Giter Club home page Giter Club logo

discord-tts-bot's Introduction

๐Ÿ‘‹ Hi There!

discord discord

Hey, I'm Christian, a computer science student at the Universidad San Francisco de Quito with a passion for programming.

๐Ÿš€ Some of My Projects

โšก Recent Activity

  1. ๐Ÿš€ Published release v0.0.5 in greencoast-studios/eslint-config-greencoast
  2. ๐Ÿš€ Published release v1.0.1 in greencoast-studios/djs-extended-data-provider-level
  3. ๐Ÿš€ Published release v1.0.0 in greencoast-studios/djs-extended-data-provider-redis
  4. ๐Ÿš€ Published release v1.0.0 in greencoast-studios/djs-extended-data-provider-level
  5. ๐Ÿš€ Published release v3.0.1 in greencoast-studios/discord.js-extended

๐Ÿ“Š Click to see my GitHub Stats


GitHub Stats
GitHub Top Languages

discord-tts-bot's People

Contributors

dependabot[bot] avatar excigma avatar lakhindarpal avatar moonstar-x avatar xjuanfxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-tts-bot's Issues

Errors using discord bot

Im having issues with installing discord.js on my discord bot, does anyone know how to resolve this issue?

it keeps giving this error:

npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=16.6.0","npm":">=7.0.0"} (current: {"node":"14.17.6","npm":"6.14.15"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN notsup Unsupported engine for @discordjs/[email protected]: wanted: {"node":">=14.0.0","npm":">=7.0.0"} (current: {"node":"14.17.6","npm":"6.14.15"})
npm WARN notsup Not compatible with your version of node/npm: @discordjs/[email protected]
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

Any help would be appreciated

Bot don't say anything

The Bot can connect to the voice channel but it doesn't say anything, I pretty sure that the bot has no error on my cmd

Cannot run the Bot

Whenever I try to start the Bot, the following error message appears:
`> [email protected] start /home/ubuntu/TTSBot/discord-tts-bot

node ./src/app.js

internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module '@discordjs/form-data'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/ubuntu/TTSBot/discord-tts-bot/node_modules/discord.js/src/rest/APIRequest.js:4:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node ./src/app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2020-06-07T17_40_59_743Z-debug.log
ubuntu@ubuntu:~/TTSBot/discord-tts-bot/config$ npm start

[email protected] start /home/ubuntu/TTSBot/discord-tts-bot
node ./src/app.js

internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module '@discordjs/form-data'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/ubuntu/TTSBot/discord-tts-bot/node_modules/discord.js/src/rest/APIRequest.js:4:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node ./src/app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2020-06-07T17_44_34_382Z-debug.log
`

TTS bot no habla

Cuando lo asignamos a una sala para que entre a hablar y le damos con el comando $say, estando nosotros en el chat de voz, el bot responde Joined #General y no habla, solo manda ese mensaje.

SharedScreenshot

RangeError notification should include phrase length

The RangeError notification message should include the phrase length so the user can tell by how many characters they need to remove so the TTS will work. Also, this notification should be placed outside of the error catch which will remove the need of using a message argument on the playTTS() function.

bot not starting

๐Ÿ› the bot not starting

i copy paste the bot token in the settings.json and gives this error
/discord-tts-bot/node_modules/discord.js/src/client/Client.js:237
if (!token || typeof token !== 'string') throw new Error('TOKEN_INVALID');
^

Error [TOKEN_INVALID]: An invalid token was provided.
at TTSClient.login (/discord-tts-bot/node_modules/discord.js/src/client/Client.js:237:52)
at Object. (/discord-tts-bot/src/app.js:168:8)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
[Symbol(code)]: 'TOKEN_INVALID'
}

get key/token failed from google

Hello there, I have been using this bot for quite a long while and it was running smoothly for me and my friend who is unable to speak.
But recently the bot is having the problem of get key failed from google which I try to look up for solution but all I can find is tell me to npm update
I tried it a few times but it also happen quite often, so I would like to ask if there is any method to fix this issue other than npm update.

Thanks
image

Not working

code is not working and your official bot too ;-;

djs v13, slash commands

โšก Describe the New Feature

New version (v13) of discord.js has been released. Discord recently announced to use slash commands only, message will be a privilege intent soon. Please upgrade this.

Feature 2

If possible add support for external database such as MongoDB

โ“ Additional Information

discord.js v13 removed inbuilt support for voice, you have to use @discord.js/voice for voice support

Commands do not complete

A TTS message for instance, will not complete if another user inputs a command before the previous one has completed.

Slash Commands Not Registering?

๐Ÿ› Describe the Bug

Slash commands for the bot are not appearing

โœ๏ธ Steps to Reproduce

Followed procedure (Updated from V3 to v4.0.2)

๐Ÿ˜• Expected Behavior

Expected slash commands to work

๐Ÿ“œ Log

The normal junk when starting the bot. Nothing about the user sending a command

๐Ÿ“ท Screenshots

Paste a screenshot of the bug (if applicable).

โ“ Other Information

  • Node Version: 16.13.2

Can't stop current stream.

For some reason the bot doesn't remember when the bot is inside a channel, the stop command doesn't work and everytime the say command is done, the bot always responds with joined channel message response.

Could you add the prefix to replace the slash command

I think prefix will be the contingency plans. Because I think some server is not agree to use the slash command.
You can develop you bot with new feature is can play music from youtube or can kick, ban, mute members. I think it's will be a perfect bot.

Crash when sending images/stickers in TTS channel

๐Ÿ› Describe the Bug

Using stickers or sending an image in TTS channel will crash the bot

๐Ÿ“œ Log

/www/wwwroot/discordbot/NetaTTS/node_modules/google-tts-api/dist/assertInputTypes.js:5
        throw new TypeError('text should be a string');
              ^

TypeError: text should be a string
    at Object.assertInputTypes [as default] (/www/wwwroot/discordbot/NetaTTS/node_modules/google-tts-api/dist/assertInputTypes.js:5:15)
    at Object.getAllAudioUrls (/www/wwwroot/discordbot/NetaTTS/node_modules/google-tts-api/dist/getAudioUrl.js:61:31)
    at /www/wwwroot/discordbot/NetaTTS/src/classes/tts/providers/GoogleProvider.js:12:32
    at new Promise (<anonymous>)
    at GoogleProvider.createPayload (/www/wwwroot/discordbot/NetaTTS/src/classes/tts/providers/GoogleProvider.js:10:12)
    at TTSPlayer.say (/www/wwwroot/discordbot/NetaTTS/src/classes/tts/TTSPlayer.js:63:36)
    at TTSChannelHandler.handleSay (/www/wwwroot/discordbot/NetaTTS/src/classes/tts/TTSChannelHandler.js:55:24)
    at TTSChannelHandler.handleMessage (/www/wwwroot/discordbot/NetaTTS/src/classes/tts/TTSChannelHandler.js:26:17)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Node.js v17.4.0

Add a custom disconnect timeout per guild.

โšก Describe the New Feature

Add a custom disconnect timeout per guild.

This implies a database to store the guild settings, which could include additionally the language for the tts.

Changing the timeout would be its own command.

Per-channel TTS

โšก Describe the New Feature

Add an option to the config to specify a channel to use without a prefix. Any messages sent in that channel will be read out loud. Maybe a list of channels and their respective voices/TTS engines, so we can have a #john-madden for all our aeiou needs, and a #no-mic-chat channel that reads aloud people's messages?

Add another tts engine

Add more tts engines, ones that do not limit to 200 characters, (add the option to add character limit as well), if possible add the moonbase alpha tts engine.

multiple voices to differentiate different speakers?

โšก Describe the New Feature

multiple voices, created either by accessing different engines or changing up generated voice lines somehow or whatever would be easiest to do so a larger number of people can talk in a conversation using tts without sounding like the same person

โœ๏ธ Functionality

different prefixes or modifiers or whatever (i.e $say1, $say2, $say3, etc) that would make the voice sound different. maybe it could recognize the requests of different users and automatically assign them voices for consistency and ease of use but that would probably be way way harder

โ“ Additional Information

my friendgroup has been using say and aeiou for this purpose but it stops working almost immediately once more than two people start using it and aeiou isn't very good for talking anyway because it's much quieter than say

langs command has a typo

When the portuguese xommand example shows up, it shows as ${config.prefix} instead of putting the actual prefix.

Bot only works if spawned using the say command but not with aeiou.

๐Ÿ› Describe the Bug

If the bot is not in a channel prior and aeiou command is used, the bot join but will not send any TTS, even if say command is used. Once this happens, the console log displays a 400 request error.

The bot only works if spawned using the say command. Any aeiou command will only work if the bot was already in a channel.

โœ๏ธ Steps to Reproduce

  1. The bot is not connected to voice.
  2. Run aeiou command
  3. Bot joins but is stuck in an unexpected state

๐Ÿ˜• Expected Behavior

The bot should be able to send TTS even if spawned using aeiou.

๐Ÿ“œ Log

Mar 12 20:42:41 moonstar-server npm[29941]: (8:42:41 PM) - [INFO] -  User yoo who did dis ๐Ÿ˜‚๐Ÿ˜‚ issued command aeiou in Greencoast Gaming.
Mar 12 20:42:42 moonstar-server npm[29941]: (8:42:42 PM) - [INFO] -  Joined ๐Ÿฆ‡ LA BATICUEVA ๐Ÿฆ‡ in Greencoast Gaming.
Mar 12 20:42:42 moonstar-server npm[29941]: (8:42:42 PM) - [ERROR] -  Request failed with status code 400

โ“ Other Information

  • Node Version: 14.9.0

Channel delete crashes the bot LevelDataProvider

๐Ÿ› Describe the Bug
Keep getting Key not found in database error randomly after running the bot

โœ๏ธ Steps to Reproduce

  1. reinstall all modules
  2. reconfigure bot settings on the discord server

๐Ÿ˜• Expected Behavior
Expected bot to run without error

๐Ÿ“œ Log

/www/wwwroot/discordbot/NetaTTS/node_modules/levelup/lib/levelup.js:188
        err = new NotFoundError('Key not found in database [' + key + ']', err)
              ^
Error [NotFoundError]: Key not found in database [829958692857970688:935454436199907358:tts_settings]
    at /www/wwwroot/discordbot/NetaTTS/node_modules/levelup/lib/levelup.js:188:15
    at /www/wwwroot/discordbot/NetaTTS/node_modules/encoding-down/index.js:75:21 {
  [cause]: [Error: NotFound: ]
}

๐Ÿ“ท Screenshots
error

โ“ Other Information
Node Version: v17.4.0
Bot version: 4.0.4

Crash when parsing custom server emojis

๐Ÿ› Describe the Bug

Using any say command with an emoji from another server (nitro feature) will crash the bot.

๐Ÿ“œ Log

/home/runner/discord-tts-bot-1/src/utils/mentions.js:18
  return message.replace(CUSTOM_EMOJI_PATTERN, (_, id) => emojis.get(id).name);
                                                                        ^

TypeError: Cannot read property 'name' of undefined
    at /home/runner/discord-tts-bot-1/src/utils/mentions.js<:18:800772399988736070>73
    at String.replace (<anonymous>)
    at cleanEmojis (/home/runner/discord-tts-bot-1/src/utils/mentions.js<:18:800772399988736070>18)
    at cleanMessage (/home/runner/discord-tts-bot-1/src/utils/mentions.js:27:11)
    at TTSChannelHandler.handleSay (/home/runner/discord-tts-bot-1/src/classes/tts/TTSChannelHandler.js:39:23)
    at TTSChannelHandler.handleMessage (/home/runner/discord-tts-bot-1/src/classes/tts/TTSChannelHandler.js:26:17)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./src/app.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2022-01-29T19_24_43_985Z-debug.log
exit status 1

Overwritten variables in Dockerfile

๐Ÿ› Describe the Bug

The Dockerfile overwrites the environment variables. If any variable is omitted when creating the container, the variable will not take the expected default value.

Settings are broken

๐Ÿ› Describe the Bug

You cannot have both a custom speed and a custom language at the same time. This also applies to every other provider with more than two settings, none of which currently exist.

โœ๏ธ Steps to Reproduce

  1. /google_set_my language fr
  2. /my_settings, see language french, speed normal
  3. /google_set_my speed slow
  4. /my_settings, see language english, speed slow

๐Ÿ˜• Expected Behavior

Language French, speed slow.

๐Ÿ“ท Screenshots

image

Add support for NextUp Ivona TTS engine.

โšก Describe the New Feature

I believe Ivona is a precursor to Amazon Polly.

Their site contains a demo functionality that exposes a public API to generate mp3 stream links.

A recopilation of the available languages and voices needs to be done, however, one can consume the API by making a request to:

https://nextup.com/ivona/php/nextup-polly/CreateSpeech/CreateSpeechGet3.php

And pass in the appropriate voice, language and text query parameters. This returns an HTML body with the URL of the generated mp3 stream.

Add support for IBM Cloud TTS.

โšก Describe the New Feature

Add support for IBM Cloud TTS. More info here: https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices

โœ๏ธ Functionality

Separate commands should be created.

There's a chance there will be a need to reorganize the current commands for different TTS engines.

Since IBM Cloud TTS also has multi language support, making a langs command would be necessary. Obviously, there's the issue that this command already exists for Google TTS.

Maybe add some sort of command prefix to change TTS engine settings?

Can't get the bot to talk (Error status code 400)

๐Ÿ˜• Question

I'm self hosting the bot, the bot is in the server and will join voice channels, but will not say anything with $say or $aeiou

โ“ Additional Information

I already have ffmpeg installed and updated

image

logger can't show Chinese character

Hello there
I am a new user to github, where I have clone the bot and use it on my server
altho it works successfully for Chinese language, but everytime when a user use the command say with Chinese words together, the cmd logger seems to be failed on displaying the Chinese character
I have tried to change default CodePage of the cmd prompt to 65001 (unicode)
but it still fails to show it
Are there any way to fix this issue?

i am Facing this error how to fix it??

(node:3600) UnhandledPromiseRejectionWarning: Error: FFmpeg/avconv not found!
at Function.getInfo (/home/runner/discord-tts-bot/node_modules/prism-media/src/core/FFmpeg.js:143:11)
at Function.create (/home/runner/discord-tts-bot/node_modules/prism-media/src/core/FFmpeg.js:156:38)
at new FFmpeg (/home/runner/discord-tts-bot/node_modules/prism-media/src/core/FFmpeg.js:45:27)
at AudioPlayer.playUnknown (/home/runner/discord-tts-bot/node_modules/discord.js/src/client/voice/player/BasePlayer.js:47:20)
at VoiceConnection.play (/home/runner/discord-tts-bot/node_modules/discord.js/src/client/voice/util/PlayInterface.js:71:28)
at TTSPlayer.play (/home/runner/discord-tts-bot/src/classes/tts/TTSPlayer.js:61:41)
at TTSPlayer.say (/home/runner/discord-tts-bot/src/classes/tts/TTSPlayer.js:45:12)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:3600) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3600) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Crash on Leaving ${channel.name} do to inactivity

๐Ÿ› Describe the Bug

Bot crashes when trying to send a log message out for leaving due to inactivity

โœ๏ธ Steps to Reproduce

  1. Turn bot on, and say a message
  2. Do not send any other message for the duration of your inactivity timer
  3. The bot will crash.

๐Ÿ˜• Expected Behavior

Expected bot to leave without crashing.

๐Ÿ“œ Log

C:\PathName\discord-tts-bot\src\classes\tts\TTSPlayer.js:44
      logger.warn(`Left ${channel.name} from ${this.guild.name} due to inactivity.`);
                                  ^

TypeError: Cannot read properties of null (reading 'name')
    at Scheduler.fn (D:\My Files\Desktop\Software Stuff\Software\Github\discord-tts-bot\src\classes\tts\TTSPlayer.js:44:35)
    at Timeout.<anonymous> (D:\My Files\Desktop\Software Stuff\Software\Github\discord-tts-bot\src\classes\Scheduler.js:21:12)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)

[process exited with code 1] (Ignore this, it's a windows terminal thing.)

๐Ÿ“ท Screenshots

image

โ“ Other Information

  • Node Version: v16.13.2

deploying the slash commands and running the bot seems to want different things out of the settings.json

๐Ÿ› Describe the Bug

deploying the slash command with the settings configured as in the readme gives me a bunch of errors that look like this:

TypeError: false in config for key OWNER_REPORTING does not conform to type string.

out of curiosity i tried converting it to a string with quotation marks, and it wanted a bunch of other stuff turned to strings too, so i did that, and eventually the command ran fine, but then gave me this error when i ran npm start:

TypeError: false in config for key OWNER_REPORTING does not conform to type boolean.

which makes sense, because i messed with the config, but the way it was working before didn't work either. i put it back to the way it was, and it opened and ran, but it won't recognize any slash commands, possibly because i had to change the config around to get the slash commands deployed and then put them back for the actual bot.

โœ๏ธ Steps to Reproduce

npm run deploy (after installing dependencies but not dev dependencies, if that matters?) in discord-tts-bot

๐Ÿ˜• Expected Behavior

bot lets me deploy slash commands and run it with the same config settings

๐Ÿ“œ Log

uhhh i dont know, is this anything?

$ npm run deploy

[email protected] deploy
node ./src/command-deployer.js

C:\Users\Mabel\discord-tts-bot\node_modules@greencoast\discord.js-extended\dist\classes\config\ConfigValidator.js:62
throw new TypeError(${value} in config for key ${key} does not conform to type ${type}.);
^

TypeError: false in config for key OWNER_REPORTING does not conform to type string.
at C:\Users\Mabel\discord-tts-bot\node_modules@greencoast\discord.js-extended\dist\classes\config\ConfigValidator.js:62:23
at Array.forEach ()
at ConfigValidator.validate (C:\Users\Mabel\discord-tts-bot\node_modules@greencoast\discord.js-extended\dist\classes\config\ConfigValidator.js:45:29)
at new ConfigProvider (C:\Users\Mabel\discord-tts-bot\node_modules@greencoast\discord.js-extended\dist\classes\config\ConfigProvider.js:81:24)
at Object. (C:\Users\Mabel\discord-tts-bot\src\command-deployer.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)

๐Ÿ“ท Screenshots

Paste a screenshot of the bug (if applicable).

โ“ Other Information

thank you for developing this bot and sorry if this is just me being clueless and not actually a bug

Error: FFmpeg/avconv not found!

2020-07-10T18:25:39.375924+00:00 app[web.1]: ๏ฟฝ[36m(6:25:39 PM) - [INFO] - Joined General in Bot Test Server.๏ฟฝ[0m
2020-07-10T18:25:39.481341+00:00 app[web.1]: ๏ฟฝ[36m(6:25:39 PM) - [INFO] - (TTS): Received googleTTS for hi with language 'en' and speed 1 in guild Bot Test Server.๏ฟฝ[0m
2020-07-10T18:25:39.505467+00:00 app[web.1]: ๏ฟฝ[31m(6:25:39 PM) - [ERROR] - Error: FFmpeg/avconv not found!
2020-07-10T18:25:39.505469+00:00 app[web.1]: at Function.getInfo (/app/node_modules/prism-media/src/core/FFmpeg.js:130:11)
2020-07-10T18:25:39.505469+00:00 app[web.1]: at Function.create (/app/node_modules/prism-media/src/core/FFmpeg.js:143:38)
2020-07-10T18:25:39.505470+00:00 app[web.1]: at new FFmpeg (/app/node_modules/prism-media/src/core/FFmpeg.js:44:27)
2020-07-10T18:25:39.505471+00:00 app[web.1]: at AudioPlayer.playUnknown (/app/node_modules/discord.js/src/client/voice/player/BasePlayer.js:47:20)
2020-07-10T18:25:39.505471+00:00 app[web.1]: at VoiceConnection.play (/app/node_modules/discord.js/src/client/voice/util/PlayInterface.js:71:28)
2020-07-10T18:25:39.505472+00:00 app[web.1]: at /app/src/classes/TTSPlayer.js:80:45
2020-07-10T18:25:39.505472+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:93:5)๏ฟฝ[0m

Add support for TTS Tool - Microsoft and Amazon voices.

โšก Describe the New Feature

The site https://ttstool.com/ exposes a public API to use with some voices from Microsoft and Amazon engines. I think maybe the Amazon ones would be duplicate as specified in #71, however this tool supports SSML and some options for volume, pitch, and rate.

To request this API, send a POST to:

https://support.readaloud.app/ttstool/createParts

With a body shaped like this:

[{
  "voiceId": "Amazon Polish (Ewa)",
  "ssml": "<speak version=\"1.0\" xml:lang=\"pl-PL\"><prosody volume='x-loud' rate='x-fast' pitch='x-high'>yeah</prosody></speak>"
}]

This returns a an JSON array with the IDs of the voices. You can technically pass in multiple items to the previous array to get multiple TTS streams in the same request. The response looks like this:

[
  "efh7l3ll"
]

You can then use this ID in a GET request like this:

https://support.readaloud.app/ttstool/getParts?q=efh7l3ll

This returns an audio/mpeg stream.

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.