Search code examples
pythonpython-3.xspeech-recognitionspeech-to-text

Python Speech Recognition and Usernames


I am currently working on a more ore less little project in Python, where I build somewhat of an voice assistant that interacts with some Gaming APIs like the Destiny2 API.

The big problem I am running into is the Recognition of the usernames (gamertags) like, for example: Ultra_Luck_y which the speech_recognition module for python I am using clearly doesn't understand. So it just returns Ultra Lucky.

I also tried spelling it, but i automatically got put together to words. So my question is wether there is a solution (no matter how crappy) or not and I have to go a different way about this?


Solution

  • Thanks to Azamat Galimzhanov, i solved it with the the Radio Alphabet, but kind of edited it so the Words were a little shorter. I simply put the references all in one json document and loaded them as a dictoniary with:

    with open('usernames.txt') as json_file:
        alphabet = json.load(json_file)