-5
#include <SoftwareSerial.h>// import the serial library

SoftwareSerial Genotronex(10, 11); // RX, TX
int ledpin=13; // led on D13 will show blink on / off
int BluetoothData; // the data given from Computer

void setup() {
  // put your setup code here, to run once:
  Genotronex.begin(9600);
  Genotronex.println("Bluetooth On please press 1 or 0 blink LED ..");
  pinMode(ledpin,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
   if (Genotronex.available()){
BluetoothData=Genotronex.read();
   if(BluetoothData=='1'){   // if number 1 pressed ....
   digitalWrite(ledpin,1);
   Genotronex.println("LED  On D13 ON ! ");
   }
  if (BluetoothData=='0'){// if number 0 pressed ....
  digitalWrite(ledpin,0);
   Genotronex.println("LED  On D13 Off ! ");
   }
}
delay(100);// prepare for next data ...
}

can anyone help me how to write the sketch for voice recognition of the above code. I'm using AMR/BT voice control app`for voice recognition.

Dave X
  • 2,332
  • 14
  • 28
  • 3
    Third time asking? Third new user? We don't have a clue what this "AMR/BT" thing is you're on about (or I certainly don't, and neither does Google, so there's no hope for anyone else). – Majenko Mar 07 '16 at 17:21
  • Its an app. Voice recognition app. So i want to add speech recognition to my above code. And also I'm using bluetooth HC-05 – Yap'Z jR Mar 07 '16 at 17:30
  • 1
    How does the app work? What does it do? How does it interface with an Arduino? – Majenko Mar 07 '16 at 18:11
  • Its there in the Google play store.. search for BT voice control – Yap'Z jR Mar 07 '16 at 18:21
  • 2
    No, I won't. You tell us, by enhancing your question, what it is, what it does, how you use it, and how you expect to use it. – Majenko Mar 07 '16 at 18:24
  • It's a voice recognition app which we speak to the microphone. And then it will convert the voice into text and send it to arduino through bluetooth. so i want to above sketch to be controlled by voice. – Yap'Z jR Mar 07 '16 at 18:34
  • So you want the arduino to be controlled by some unspecified stream of serial data? (that just happens to be generated on an app and delivered via bluetooth....) What would the stream look like? "Ari on" "Ari off" ? – Dave X Mar 07 '16 at 18:39
  • Yeah may be like Lights On , Lights off – Yap'Z jR Mar 07 '16 at 18:41
  • ... As far as the arduino would care, it sounds like it would all be serial dat, and the voice recognition is irrelevant. What's the question? And what's with the "press 0 or 1..." do you mean "say 'zero' or 'one'..." ? – Dave X Mar 07 '16 at 18:43
  • Inplace of pressing 1 0r 0 i want speech to text...which means i will give a command lights on or light off – Yap'Z jR Mar 07 '16 at 18:48
  • 2
    If you tell us what your mystery app sends to the Arduino we can help you craft the code to interpret that data. Until you tell us that simple basic bit of information we cannot help you. – Majenko Mar 07 '16 at 18:52
  • Alright...the app is like google tap/ google voice search – Yap'Z jR Mar 07 '16 at 18:56
  • Put https://www.arduino.cc/en/Tutorial/SoftwareSerialExample on your arduino, hook up your bluetooth, talk to your app, and watch what it prints in the serial monitor. – Dave X Mar 07 '16 at 19:10
  • Does http://arduino.stackexchange.com/a/3978/6628 help? – Dave X Mar 07 '16 at 19:23
  • Forget it - an Arduino is neither capable of performing voice recognition itself, nor a reasonable choice for collecting audio data on behalf of some remote compute service which is. – Chris Stratton Mar 08 '16 at 01:48
  • Please stop creating new accounts to ask the same question. – Nick Gammon Mar 13 '16 at 01:08

1 Answers1

2

Your question is not very specific.

But, I think your talking about the AMR_Voice application for Android, and your trying to use the HC-05 BT to connect to your cell. I hope I'm right in my guess, and funny enough, someone over at Instructables did exactly the same thing.

Arduino Voice recognition Via Bluetooth HC-05 - http://www.instructables.com/id/Arduino-Voice-recognition-Via-Bluetooth-HC-05/

Hope this helps!

Robert Cole
  • 138
  • 5