An Example of Azure Speaker Recognition API

Java source codes in GitHub: testAzureSpeakerRecognitionAPI

If you are looking for a demo, please click here.

Currently, the documents about Speaker Recognition API are not good enough. Besides, the sample codes of Java cannot be used directly.

Basically, there are three steps to use Speaker Recognition API. 

  • Create profile
  • Create enrollment
  • Identification

To run the source codes, steps include:

  • Create Cognitive Services in Azure and copy Subscription key to "Authentication.java".
  • Run "CreateProfile.java" and copy profile id from response to "Authentication.java".
  • Run "CreateEnrollment.java" with specific audio file and save operation id in response header.

  • Run "GetOperationStatus.java" with specific operation id.

  • Create more than one profile and upload more audio files for each profile, run "Identification.java" with a new audio file. Similarly, save operation id in response header.
  • Again, run "GetOperationStatus.java" with specific operation id.

 

As for audio file, the format must meet the following requirements.

It took me nearly 2 hours to find a way to create a valid audio file.

  • Use default sound recorder to crate a audio file(WMA).

  • After that, use Wav Sample Rate Converter to change sample format.

 

Finally, the duration of an audio file shouldn't be too long (between 30s and 40s) otherwise the size may be too large and exceptions will probably occur when creating erollment. 

 

Cheers!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值