Rei-x / discord-speech-recognition

Speech to text extension for discord.js
https://npmjs.com/package/discord-speech-recognition
MIT License
57 stars 23 forks source link

Multi language Support #22

Closed BohnSeb closed 3 years ago

BohnSeb commented 3 years ago

If possible it would be great for the speech recognition to be able to accept different languages at the same time

Rei-x commented 3 years ago

It's possible, but it would be hard to implement, because speech recognition apis that are used in this library, requires to specify language, before sending the request. The most I can do is to give possibility to specify language per user or per guild, for example:

All of them can speak in the same channel in the same time and their speech will be recognized correctly. Will it satisfy your needs?

BohnSeb commented 3 years ago

No, that wasn't what I had in mind. I'll try to explain it differently: For example: I'm speaking german and the Bot is set to german. If I say an English word, the API tries to find a German word, sometimes it works, but often it instead gives me an similar sounding german word.

Rei-x commented 3 years ago

It's not possible with the apis that are currently used in this library, it could be done with preview version of google cloud speech-to-text that supports detecting language spoken automatically (multiple-languages), but it is paid after 60 minutes of transcription, here you can check pricing: pricing I would like this library to use only free options of speech recognition, but if it's a killer feature for you I can implement this using speech-to-text service mentioned above.