Listen to noise
Marco Tricca from United States  [2 posts]
8 year
HI, I am making a home automation robot.
I need to set up a noise level detection. I am trying to use "Listen" command but it will listen just to words.
How I do this?
I am using kinect 360 array mics to detect any noise it would be in the room and the kinect 360 with "movement" to detect movements.
Anyways after the detection I am using an IF statement that reads "movement percent" to  make "speak" the robot.
after this action I need a "WAIT FOR" to wait for my voice command.
How do I achieve the wait for?
otherwise every movement triggers the "speak" so I can't talk to give the command.
Hope I have been clear.

Steven Gentner from United States  [1446 posts] 8 year

After speaking you need to set a variable that will avoid the speaking again until something has been heard. Ie.

if spoken <> 1 then
  SetVariable spoken=1
  if textHeard <> "" then
    SetVariable spoken=0
  end if
end if

or use something like a status variable that will move you through steps.

if status = 1 then
  Set_Variable status = 2
end if

if status = 2 then
  if textHeard <> ""
    Set_Variable status = 3
  end if
end if

if status = 3 then
  process heard commands or reset to speak again
end if



This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index