[英]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.我目前正在 Python 中做一个更简单的小项目,我在其中构建了一个语音助手,可以与 Destiny2 API 等游戏 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.我遇到的最大问题是用户名(玩家代号)的识别,例如: Ultra_Luck_y ,我正在使用的 python 的
speech_recognition
模块显然无法理解。 So it just returns Ultra Lucky.所以它只返回 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?
所以我的问题是是否有解决方案(无论多么糟糕),我必须 go 对此采取不同的方式?
Thanks to Azamat Galimzhanov, i solved it with the the Radio Alphabet, but kind of edited it so the Words were a little shorter.感谢 Azamat Galimzhanov,我用无线电字母表解决了它,但对它进行了某种编辑,使单词更短一些。 I simply put the references all in one json document and loaded them as a dictoniary with:
我只是将所有参考资料放在一个 json 文档中,并将它们作为字典加载:
with open('usernames.txt') as json_file:
alphabet = json.load(json_file)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.