I am trying to use Google Speech API for iOS applications using Swift.
Below is a sample input from a local audio file:
curl-X POST\
--data-binary@audio/good-morning-google.flac\
--header'Content-Type:audio/x-flac;rate=44100;'\
'https://www.google.com/speech-api/v2/recognize?output=json&lang=en-us&key=yourkey'
I don't know how to implement a similar POST with Swift, so could you please let me know?
Specifically,
--data-binary@audio/good-morning-google.flac\
I am not sure where to send the locally saved audio file as binary data specification like .
Please refer to: [Google Speech API]
https://gist.github.com/alotaiba/1730160
Why don't we just put binary data into the HTTPBody of the NSMutableURLRequest?
© 2024 OneMinuteCode. All rights reserved.