question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid configuration mapping when import Microsoft.CognitiveServices.Speech nuget

See original GitHub issue

I try to import speech sdk into my azure function in visual studio for mac. I don’t see any error in the nuget package console. But it has an Invalid configuration mapping error in the project tree. Here is my csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <AzureFunctionsVersion>v3</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.0.0" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.3" />
    <PackageReference Include="Microsoft.CognitiveServices.Speech" Version="1.13.0" />
  </ItemGroup>
  <ItemGroup>
    <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Shared\" />
    <Folder Include="Shared\Services\" />
  </ItemGroup>
</Project>

I searched around and tried this solution to add platform configs

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_macOS|AnyCPU' " />   
 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_macOS|AnyCPU' " />

but it still didn’t work. The project can be built and run, but it can’t find any azure http function.

 No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).

If I remove the nuget Microsoft.CognitiveServices.Speech then it works fine. Isn’t the speech sdk compatible with .netcore or azure function?

Version of the Cognitive Services Speech SDK 1.13.0

Platform, Operating System, and Programming Language

  • OS: macos
  • Hardware - x64
  • Programming language: C#

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jhakulincommented, Aug 13, 2020

@ductranit Thanks for details, this is issue in our SDK for Mac, we are working on to fix this.

0reactions
ductranitcommented, Aug 18, 2021

@jhakulin I had the same error with vscode + azure function extension on macos

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to load DLL "Microsoft.CognitiveServices.Speech. ...
Hi. I have a console application that I made in Visual Studio 2022, using C#, .NET Framework 4.8.1, and the Azure Cognitive Services...
Read more >
What's new in Azure AI Speech?
Find out about new releases and features for Azure AI Speech.
Read more >
Install the Speech SDK - Azure AI services
From the search results, select the Microsoft.CognitiveServices.Speech package, and then select Install to install the latest stable version.
Read more >
Microsoft speech NuGet package doesn't work in C++ project
I'm trying to use the Azure cognitive services speech api in a C++ project and followed the instructions to install the NuGet package ......
Read more >
Building a Real Time .NET Transcription Service
Microsoft.CognitiveServices.Speech. Transcription Engine. With these projects imported, create a new class called TranscriptionEngine. First, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found