Azure语音服务的价格表:https://azure.microsoft.com/en-us/pricing/details/cognitive-services/translator/
Maven学习:https://www.runoob.com/maven/maven-pom.html
一个小型的quickstart 源码:https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/quickstart/java/jre/from-microphone/pom.xml
后端sample code(Java版本):https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/samples/java/jre/console
支持地区列表:https://docs.microsoft.com/zh-cn/azure/cognitive-services/speech-service/regions
语音语言支持,包括语言编码:https://docs.microsoft.com/zh-cn/azure/cognitive-services/speech-service/language-support
Speech Service Overview,包括语音识别,语音合成的SDK和RestfulAPI的支持情况,订阅号获取方式,样例代码地址: https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/overview#find-keys-and-locationregion
Speech SDK Setup:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/quickstarts/setup-platform?pivots=programming-language-java&tabs=dotnet%2Cwindows%2Cjre%2Cbrowser
Speech to Text quick start: https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speech-to-text?tabs=windowsinstall&pivots=programming-language-java
语音翻译快速入门(包括语音转语音和语音转文字,同步以及异步):https://docs.microsoft.com/zh-cn/azure/cognitive-services/speech-service/get-started-speech-translation?tabs=script%2Cwindowsinstall&pivots=programming-language-java
语音识别样例代码(使用流推送的function是recognitionWithAudioStreamAsync):https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/a09557bb6f1d2c2321018bad81514a557aecd479/samples/java/jre/console/src/com/microsoft/cognitiveservices/speech/samples/console/SpeechRecognitionSamples.java#L320
语音识别+语音合成样例代码:https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/quickstart/java/jre/translate-speech-to-text/src/speechsdk/quickstart/Main.java
批量上传功能(如果是使用异步调用SDK的话不需要看,仅作记录):https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/batch-transcription
官方简易中文说明:https://docs.microsoft.com/zh-cn/azure/cognitive-services/speech-service/get-started-speech-translation?tabs=script%2Cterminal&pivots=programming-language-cpp
SDK download:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-sdk?tabs=linux%2Cubuntu%2Cios-xcode%2Cmac-xcode%2Candroid-studio
C++ SDK API:https://docs.microsoft.com/en-us/cpp/cognitive-services/speech/speechrecognizer
pullStream:https://docs.microsoft.com/en-us/cpp/cognitive-services/speech/audio-pullaudioinputstream
ContinueAsync 样例代码:https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/a09557bb6f1d2c2321018bad81514a557aecd479/samples/cpp/windows/console/samples/translation_samples.cpp
在云端进行部署的时候需要进行一些环境配置,下面的链接是针对RHEL7/CentOS7:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-configure-rhel-centos-7
其他Linux版本配置见:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-configure-openssl-linux?pivots=programming-language-java
个人只使用过CentOS的配置方法,下面那个配置链接里的设置并没有尝试过,但是使用同事的Ubuntu测试服务器运行非常顺利也没有使用额外的命令,显然Ubuntu需要的配置应该相对比较简单。
非C++开发的话完成下面这一步就行了,当然最好将下面这句话写入~/.bashrc
或者~/.bash_profile
中(有~/.bashrc
则优先使用~/.bashrc
),C++开发的话Azure所有配置都要全部run一遍:
# Add updated C/C++ runtimes to the library path
# (this is required for any development/testing with Speech SDK)
export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH
https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-use-logging
查看错误信息的话用这个方法非常有效。