![]() ![]() ![]() Put the json file inside your bot directory and rename it to gspeech_key.json.Create a new Service Account Key (or use existing) and download the json file.Create a new Service Account (or use your existing one):.You may want to adjust the languageCode value if you're speaking a non-English language.Make a new Text channel specifically for that Voice channel called voice-spam. Open index.js, inside the function transcribe(file) make sure that transcribe_gspeech is being used and the other one(s) are disabled. Currently, if you want to share something you’re talking about in Voice, your options are to: DM it to every person individually, Post it in general where people will get confused as to why you posted a video about stoats, or.You can use Google's Speech-to-Text API as follows: But you can easily integrate any other API into the bot. should be an ISO 639-1 language code (2 digits):īy default WitAI's free API is used for voice recognition / transcription. The bot should reply with a success message. You can also change the language using the following bot command: If you're not speaking English on Discord, then change your default language on WitAI under "settings" for your app. WitAI supports over 120 languages ( ), however only one language can be used at a time. Using Mozilla DeepSpeech for speech recognition, tutorial. If you have a very sensitive microphone or a lot of (background) noise, then voice commands may not work properly for you.is usually between 1 and 2 seconds, long enough for discord to stop processing your audio input. ![]() A successful voice command should should not contain too many/long periods of silence, otherwise the bot will only receive separate words instead of the whole sentence.A successful voice command should contain as little noise before and after the command.Using shell or command prompt execute the following: You need nodeJS version 12+ with npm on your machine. Once you've configured the Dockerfile you can build and run it: Refer to the settings section below for details on these. Near the bottom you have to provide API Credentials either using the settings.json file or setting the ENV variables. If you prefer using Docker instead of manually installing it.Ĭopy the Dockerfile.sample to Dockerfile and edit it. You will need to configure the "Config Vars" under "Settings" tab, these are the environment variables from the settings section below. Under "Resources" tab, use the "worker" deno type, and not the "web" one. If you don't have a linux server/machine then you can use Heroku for hosting your bot 24/7 and it's free. You can follow the steps below to get this bot up and running. Try the bot for yourself on our Discord server: A speech-to-text bot for discord with music commands and more written in NodeJS. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |