我应该使用哪个工具以 Microsoft Speaker Recognition API 支持的格式录制音频(或转换录制的音频)?

Which tool should I use to record audio (or convert the recorded audio) in the format supported by Microsoft Speaker Recognition API?

我正在试用 ASP.NET Core 中的 Microsoft 认知服务、说话人识别 API。但是我不知道如何将音频文件作为以下支持格式的输入:

容器- WAV

编码- PCM

速率 - 16K

示例格式 - 16 位

频道 - 单声道

有人可以帮我解决这个问题吗?

谢谢。

配置输入模式为wav:

// 配置识别器的输入。

recognizer.SetInputToWaveFile(@"c:\temp\SampleWAVInput.wav");

article 讨论如何使用 System.Speech 命名空间中的识别器识别音频文件。

您也可以尝试使用 SetInputToAudioStream() 输入格式。