2017-03-14 70 views
0

我使用Bing Speech-to-Text Android SDK測試自定義語音服務。如何通過Bing Speech-to-Text * Android * SDK設置自定義端點Uri?

但是,我無法使用Android SDK設置自定義終端的Uri。 在當前SDK中,端點Uri在Aar庫的SpeechRecognitionServiceFactory.class中進行了硬編碼,無法對其進行更改。我們可以很容易地改變它。)

請告訴我如何在Android Bing語音SDK上設置自定義端點Uri?

最好的問候;

回答

0

解決:-)

該庫已過時使用自定義端點的條目。例如:

原件(以標準端點):

    this.micClient = SpeechRecognitionServiceFactory.createMicrophoneClient(
         this, 
         this.getMode(), 
         this.getDefaultLocale(), 
         this, 
         this.getPrimaryKey()); 

改變(自定義端點):

    this.micClient = SpeechRecognitionServiceFactory.createMicrophoneClient(
         this, 
         this.getMode(), 
         this.getDefaultLocale(), 
         this, 
         this.getPrimaryKey(), 
         this.getPrimaryKey(), 
         "YourCustomEndPoint"); 

快樂黑客!

相關問題