how do I use true and false logic for speech recognition?
1 次查看(过去 30 天)
显示 更早的评论
how do I use true and false logic for speech recognition?
for example I have 5 words' cat ',' dog ',' fish ',' lion, 'tiger'. if I run the 'cat' sound and it is processed with KNN if the results come out 'cat' then correct (True) if not then wrong (False), if I run the word 'dog' if the result is 'dog' then true if not then false, etc.
somebody helpl me? thanks.
0 个评论
回答(2 个)
Walter Roberson
2019-11-28
You write your code to "train" with known data. Then you write a prediction routine that takes a sound and guesses which class it belongs to. You do that with some sounds whose correct class is known, and you compare the predicted class to the actual class in order to get the true/false that you are looking for. You can create ROC statistics from that.
Eventually you arrive at a set of training parameters that is as good as you are going to get using the algorithm. At that point you can start running new sounds through the algorithm. When you do that, you will not be able to get out a true/false as to whether it got the correct class.
0 个评论
Image Analyst
2019-11-28
I'd first turn your word into text. Look in the help for how to turn your audio into a text string (word):
>> doc speech2text
Then use strcmpi()
if strcmpi(yourWord, 'cat')
% You said cat
elseif strcmpi(yourWord, 'dog')
% You said dog.
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!