How to identify words from an audio file?
5 views (last 30 days)
Show older comments
Hello ppl I want to identify the words of an audio file that is recorded with a little gap in between the words. It has only basic words like left, right, back, etc., and guve inputs to the arduino depending on the word recognized. I don't know if this is very simple!! But i need help. Plse tell if you guys know something about it. Thanks in advance?
0 Comments
Answers (1)
Rahul
on 3 Jan 2025
In order to identify words from an audio file, consider using the following MathWorks File Exchange submission: https://www.mathworks.com/matlabcentral/fileexchange/65266-speech2text
Here is an example:
% Reading and playing the recorded audio
[audio, fs] = audioread('recorded_audio.wav');
soundsc(audio, fs);
% Converting speech from audio to text using 'speechClient' which connects
% to use use third party API's for the conversion.
speechObject = speechClient('Google','languageCode','en-US');
outInfo = speech2text(speechObject, samples, fs);
>> outInfo.Transcript
ans =
"hello my name is Rahul"
>> outInfo.Confidence
ans =
0.8640
Refer to the following MATLAb Answer and MathWorks documentation to know more:
'Answer': https://www.mathworks.com/matlabcentral/answers/214555-how-to-convert-speech-to-text?s_tid=srchtitle
'speech2text': https://www.mathworks.com/help/audio/ref/speech2text.html
Hope this helps! Thanks.
0 Comments
See Also
Categories
Find more on Audio I/O and Waveform Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!