Problem With Voice Recognition

1 回表示 (過去 30 日間)
JOJO
JOJO 2013 年 12 月 18 日
回答済み: Dinesh Agarwal 2014 年 3 月 30 日
When I put it in Matlab it does not work it give error Error: File: Voice Recognition.m Line: 1 Column: 1 The input character is not valid in MATLAB statements or expressions. and other errors when you delete the error line.
The Matlab program Iam using is r2013b
What I should do?

回答 (5 件)

Suneesh
Suneesh 2013 年 12 月 18 日
The first error is on: ‘Get ready to record your name’
This is a line of text in the provided code which is not MATLAB syntax. I suggest commented it out:
The rest of the errors seem to be caused due to the usage of apostrophes instead of single quotes:
for i = 1:1
file = sprintf(%s%d.wav’,'rec’,i);
input(Press enter when ready to record your name);
You may fix these issues by simple replacing all the apostrophes (`) with single quotes (')

JOJO
JOJO 2013 年 12 月 18 日
編集済み: JOJO 2014 年 1 月 26 日
I commented the first line and change all the apostrophes to single quotes. However now it give this error
Error using wavread (line 68)
Invalid Wave File. Reason: Cannot open file.
Error in VoiceRecognition (line 14)
[t, fs] = wavread (file);
  1 件のコメント
Walter Roberson
Walter Roberson 2014 年 1 月 26 日
Which directory are your rec1.wav, rec2.wav and so on in?

サインインしてコメントする。


Walter Roberson
Walter Roberson 2013 年 12 月 18 日
For the moment replace
path='rec1.wav';
with
path='';
Eventually, have a look at fullfile()

JOJO
JOJO 2013 年 12 月 20 日
編集済み: JOJO 2013 年 12 月 20 日
Now it is working!!! -What is the fulfile() ?
-The command WAVRECORD is being change to AUDIORECORDER so I change them to AUDIORECORDER?
-However when I say the same word it says "You are not ..." every time.
How to make the correlation better or the comparison better so that it recognize when I say the same word twice?

Dinesh Agarwal
Dinesh Agarwal 2014 年 3 月 30 日
You can just change the name of .m file. Replace Voice Recognition.m with voice_recognition.m then this will not show any error and program may work properly.

カテゴリ

Help Center および File ExchangeSpeech Recognition についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by