Rei-x/discord-speech-recognition

Multi language Support

BohnSeb opened this issue · 3 comments

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

Rei-x commented

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:

  • User A set his language to be deutsch
  • User B set his language to be chinese
  • User C didn't specify his language, so he will use default guild language, english

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?

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

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.