I am trying to convert speech to text in an iOS application using Google's Speech to Text API. I am simply sending some audio data to the URL "https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=en-US" and it is returning me the (mostly) correct words I say. However, it is replacing any profanity with '####'. How can I replace the '####' with the actual curse words?
Just some additional information: I am using the todoroo SpeechToText library. The code for the request is as follows:
NSURL *url = [NSURL URLWithString:@"https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=en-US"];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:byteData];
[request addValue:@"audio/x-speex-with-header-byte; rate=16000" forHTTPHeaderField:@"Content-Type"];
[request setURL:url];
[request setTimeoutInterval:15];
NSURLResponse *response;
NSError *error = nil;
....
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];