S
ShinehahGnolaum
Guest
I get a build error using Visual Studio for Mac.
I was able to run the project when on an iPhone 8 when it was "clean", before I put any code in it.
Here is the error:
/Users/shinehah/VSProjects/iOSAppSpeechToText01/iOSAppSpeechToText01/MTOUCH: Error MT0009: Error while loading assemblies: /Users/shinehah/.nuget/packages/grpc.core/1.18.0/runtimes/win/native/grpc_csharp_ext.x64.dll (MT0009) (iOSAppSpeechToText01)
Here are the warnings:
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(5,5): Warning MSB3277: Found conflicts between different versions of "System.Numerics" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. (MSB3277) (iOSAppSpeechToText01)
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(5,5): Warning MSB3277: Found conflicts between different versions of "Microsoft.CSharp" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. (MSB3277) (iOSAppSpeechToText01)
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(5,5): Warning MSB3277: Found conflicts between different versions of "System.Net.Http" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. (MSB3277) (iOSAppSpeechToText01)
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(5,5): Warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see Enable or disable autogenerated binding redirects. (MSB3276) (iOSAppSpeechToText01)
/Users/shinehah/VSProjects/iOSAppSpeechToText01/iOSAppSpeechToText01/ViewController.cs(33,33): Warning CS1701: Assuming assembly reference 'Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604' used by 'Google.LongRunning' matches identity 'Google.Protobuf, Version=3.5.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604' of 'Google.Protobuf', you may need to supply runtime policy (CS1701) (iOSAppSpeechToText01)
/Users/shinehah/VSProjects/iOSAppSpeechToText01/iOSAppSpeechToText01/ViewController.cs(29,29): Warning CS1701: Assuming assembly reference 'Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604' used by 'Google.LongRunning' matches identity 'Google.Protobuf, Version=3.5.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604' of 'Google.Protobuf', you may need to supply runtime policy (CS1701) (iOSAppSpeechToText01)
The error occurs last, after the warnings.
Here is all the code I added. I didn't add any other code.
public override void ViewDidLoad()
{
base.ViewDidLoad();
var URI = "gs://speech-storage-bucket-01/long.flac";
Console.WriteLine("Start!");
AsyncRecognizeGcs(URI);
Console.WriteLine("End.");
}
static object AsyncRecognizeGcs(string storageUri)
{
var speech = SpeechClient.Create();
var longOperation = speech.LongRunningRecognize(new RecognitionConfig()
{
Encoding = RecognitionConfig.Types.AudioEncoding.Flac,
SampleRateHertz = 32000,
AudioChannelCount = 1,
LanguageCode = "en",
}, RecognitionAudio.FromStorageUri(storageUri)); // error here
longOperation = longOperation.PollUntilCompleted();
var response = longOperation.Result;
foreach (var result in response.Results)
{
foreach (var alternative in result.Alternatives)
{
Console.WriteLine($"Transcript: { alternative.Transcript}");
}
}
return 0;
}
The only other difference is that I installed Google.Cloud.Speech.V1.
That's everything I changed after a new clean project.
I have tried using Google.Cloud.Speech.V1 1.0.1 package instead of 1.1.0, but I get the same error.
Continue reading...
I was able to run the project when on an iPhone 8 when it was "clean", before I put any code in it.
Here is the error:
/Users/shinehah/VSProjects/iOSAppSpeechToText01/iOSAppSpeechToText01/MTOUCH: Error MT0009: Error while loading assemblies: /Users/shinehah/.nuget/packages/grpc.core/1.18.0/runtimes/win/native/grpc_csharp_ext.x64.dll (MT0009) (iOSAppSpeechToText01)
Here are the warnings:
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(5,5): Warning MSB3277: Found conflicts between different versions of "System.Numerics" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. (MSB3277) (iOSAppSpeechToText01)
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(5,5): Warning MSB3277: Found conflicts between different versions of "Microsoft.CSharp" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. (MSB3277) (iOSAppSpeechToText01)
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(5,5): Warning MSB3277: Found conflicts between different versions of "System.Net.Http" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. (MSB3277) (iOSAppSpeechToText01)
/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(5,5): Warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see Enable or disable autogenerated binding redirects. (MSB3276) (iOSAppSpeechToText01)
/Users/shinehah/VSProjects/iOSAppSpeechToText01/iOSAppSpeechToText01/ViewController.cs(33,33): Warning CS1701: Assuming assembly reference 'Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604' used by 'Google.LongRunning' matches identity 'Google.Protobuf, Version=3.5.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604' of 'Google.Protobuf', you may need to supply runtime policy (CS1701) (iOSAppSpeechToText01)
/Users/shinehah/VSProjects/iOSAppSpeechToText01/iOSAppSpeechToText01/ViewController.cs(29,29): Warning CS1701: Assuming assembly reference 'Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604' used by 'Google.LongRunning' matches identity 'Google.Protobuf, Version=3.5.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604' of 'Google.Protobuf', you may need to supply runtime policy (CS1701) (iOSAppSpeechToText01)
The error occurs last, after the warnings.
Here is all the code I added. I didn't add any other code.
public override void ViewDidLoad()
{
base.ViewDidLoad();
var URI = "gs://speech-storage-bucket-01/long.flac";
Console.WriteLine("Start!");
AsyncRecognizeGcs(URI);
Console.WriteLine("End.");
}
static object AsyncRecognizeGcs(string storageUri)
{
var speech = SpeechClient.Create();
var longOperation = speech.LongRunningRecognize(new RecognitionConfig()
{
Encoding = RecognitionConfig.Types.AudioEncoding.Flac,
SampleRateHertz = 32000,
AudioChannelCount = 1,
LanguageCode = "en",
}, RecognitionAudio.FromStorageUri(storageUri)); // error here
longOperation = longOperation.PollUntilCompleted();
var response = longOperation.Result;
foreach (var result in response.Results)
{
foreach (var alternative in result.Alternatives)
{
Console.WriteLine($"Transcript: { alternative.Transcript}");
}
}
return 0;
}
The only other difference is that I installed Google.Cloud.Speech.V1.
That's everything I changed after a new clean project.
I have tried using Google.Cloud.Speech.V1 1.0.1 package instead of 1.1.0, but I get the same error.
Continue reading...