voice control by ozmoz12th Oct 2008 15:28
|
---|
Summary This program voice control program if you say 'yes' this program print 'yes' and if you say "no" this program print "no" Description try my progragram .It is very entertaining. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com dim sat(200) sync rate 60 if FILE EXIST("voice.wav")=1 then delete file "voice.wav" do if durum=0 then record sound 1 if spacekey()=1 then durum=1 :stop recording sound:save sound "voice.wav",1 if durum=1 then play sound 1:durum=2 if durum=2 OPEN TO READ 1, "voice.wav" For i=1 to 200 rem READ STRING 1, sat$(i) READ BYTE 1,sat(i) next i CLOSE FILE 1 if sat(160)=130 then print "yes" if sat(160)=131 then print "no" durum=3 endif if durum=3 then wait key:end sync loop |