Context
I have to implement a Speech to Text feature in a Xamarin.iOS app using Google Cloud Speech api.
The audio needs to be streamed as the user speaks, so that we can show what the user says as soon as we can.
Firstly I tried to use the Google.Cloud.Speech.V1 Nuget package but the gRPC library seems to not working with Xamarin (https://github.com/grpc/grpc/issues/1620, https://forums.xamarin.com/discussion/94534/how-to-use-google-cloud-speech-api-within-xamarin-forms, Xamarin, Grpc, Could not resolve type with token 0100002b).
So I tried to create a binding over this sample: https://github.com/GoogleCloudPlatform/ios-docs-samples/tree/master/speech/Objective-C/Speech-gRPC-Streaming.
I created a static library, kept only the SpeechRecognitionService.h and SpeechRecognitionService.m files and generated the *.a fat library.
The issue
I have to generate the ApiDefinition.cs using sharpie.
So I executed the command sharpie bind -sdk iphoneos11.2 -output Output -scope . [full-path-to-SpeechRecognitionService.h]
. I tried some clang options but each time I have this kind of error:
Parsing 1 header files...
[full-path-to-project]/SpeechRecognitionService.h:18:9: fatal error:
'google/cloud/speech/v1/CloudSpeech.pbrpc.h' file not found
#import "google/cloud/speech/v1/CloudSpeech.pbrpc.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Binding...
1 error generated.
Error while processing [full-path-to-project]/SpeechRecognitionService.h.
Done. Exiting with error code 1.
error: Clang failed to parse input and exited with code 1
It seems that I have to pass some clang arguments to tell where are the headers but they are not all in one folder.
How can I tell sharpie to search for headers in multiples folders?