Borrar filtros
Borrar filtros

how do I use true and false logic for speech recognition?

1 visualización (últimos 30 días)
nana rosd
nana rosd el 28 de Nov. de 2019
Respondida: Image Analyst el 28 de Nov. de 2019
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.

Respuestas (2)

Walter Roberson
Walter Roberson el 28 de Nov. de 2019
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.

Image Analyst
Image Analyst el 28 de Nov. de 2019
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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by