Skip to content

Instantly share code, notes, and snippets.

@VermaPranav
Created July 2, 2014 05:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VermaPranav/f760f27ba68bba808956 to your computer and use it in GitHub Desktop.
Save VermaPranav/f760f27ba68bba808956 to your computer and use it in GitHub Desktop.
Google speech API is not giving result on iPad and iPod touch
Hi,
I have used the google sppech api v2 version in my project and it is working fine on iPhone.
But while testing on iPod Touch and iPad, i am getting null response from google api.
What can be the reason.
Please help me out.
I have used this line of code
NSURL *url = [NSURL URLWithString:@"https://www.google.com/speech-api/v2/recognize?output=json&lang=en-IN&key=AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw"];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:byteData];
[request addValue:@"audio/x-speex-with-header-byte; rate=16000" forHTTPHeaderField:@"Content-Type"];
@VermaPranav
Copy link
Author

If somebody have faced the same issue and have any solution then share with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment