Tongue Twister-蹇€熼泦鎴愬崕涓哄疄鏃惰闊宠瘑鍒湇鍔$帺杞粫鍙d护

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Tongue Twister-蹇€熼泦鎴愬崕涓哄疄鏃惰闊宠瘑鍒湇鍔$帺杞粫鍙d护相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/%e8%bd%bb%e6%9d%be' title='杞绘澗'>杞绘澗   lang   娣卞害   repo   zh-cn   濡備綍   end   pos   璇煶璇嗗埆鏈嶅姟   

鍓嶈█

瀹炰笉鐩哥瀿锛屽皬缂栦綔涓轰簡涓€涓箹鍗椾汉锛屾椂甯歌璇存櫘閫氳瘽涓嶅鏍囧噯锛屼笉浠匩/L涓嶅垎锛屾湁鏃跺€欒繕鍒嗕笉鍑烘潵鍗疯垖闊筹紝缁忓父闂圭瑧璇濓紝瀵艰嚧灏忕紪鍗佸垎鑻︽伡銆?鏈夋椂鐪嬬潃鐢佃閲岀殑涓绘寔浜烘祦鍒╃殑鍙f挱锛屽拰瀹屽叏鏍囧噯鐨勭粫鍙d护閮界尽鎱曚笉宸诧紝甯稿父骞绘兂鐫€鑷繁鏈変竴澶╀篃鑳借涓€鍙f祦鍒╃殑缁曞彛浠ゃ€傛伆宸э紝灏忕紪鏄ㄦ棩涓婄綉鐨勬椂鍊欒鎺ㄩ€佷簡闆嗘垚浜嗗崕涓篐MS ML Kit瀹炴椂璇煶鏈嶅姟鐨勫皬娓告垙-Tongue Twister锛?杩欐娓告垙绌剁珶鏄浣曠帺杞粫鍙d护鐨勶紝鎺ヤ笅鏉ュ氨鍜屽皬缂栦竴璧蜂竴鎺㈢┒绔熷惂锛?/p>

搴旂敤鍦烘櫙

Tongue Twister 灏辨槸涓€娆鹃泦鎴愪簡鍗庝负HMS ML Kit瀹炴椂璇煶璇嗗埆鏈嶅姟鐨勭粫鍙d护灏忔父鎴忥紝娓告垙涓竴鍏辨湁5涓叧鍗★紝姣忎竴涓叧鍗″氨鏄竴娈电粫鍙d护锛岄€氳繃绉樿瘈灏辨槸鍑€熷己澶х殑瀹炴椂璇煶璇嗗埆锛屽疄鏃惰闊宠瘑鍒湇鍔¤鐩栨棩甯哥敓娲诲強宸ヤ綔涓殑浼楀棰嗗煙锛屽苟涓旀繁搴︿紭鍖栦簡璐墿鎼滅储銆佸奖瑙嗘悳绱€侀煶涔愭悳绱互鍙婂鑸瓑鍦烘櫙涓殑璇嗗埆鑳藉姏锛岃瘑鍒噯纭巼楂橈紝鍙交鏉炬娴嬮棷鍏宠€呯殑鍙戦煶锛屽鑻ュ彂闊虫竻鏅版爣鍑嗗嵆鍙繃鍏筹紝

鎶€鏈浘鐗? src=https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides-V5/sdk-data-security-0000001050040129-V5#ZH-CN_TOPIC_0000001050750251__section2688102310166
鑻憋細https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides-V5/sdk-data-security-0000001050040129-V5#EN-US_TOPIC_0000001050750251__section2688102310166

  • 鐢ㄦ埛璋冪敤鎺ュ彛鍒涘缓涓€涓闊宠瘑鍒櫒銆?/li>
    MLAsrRecognizer = MLAsrRecognizer.(context);
    1. 鍒涘缓璇煶璇嗗埆缁撴灉鐩戝惉鍣ㄥ洖璋冦€?/li>
    SpeechRecognitionListener MLAsrListener {
         @Override
         onStartListening() {
             }
    
         @Override
         onStartingOfSpeech() {
             }
    
         @Override
         onVoiceDataReceived([] data, energy, Bundle bundle) {
    
         }
    
         @Override
         onRecognizingResults(Bundle partialResults) {
    
         }
    
         @Override
         onResults(Bundle results) {
    
             }
         }
    
         @Override
         onError(error, String errorMessage) {
    
         }
    
         @Override
         onState(state, Bundle params) {
    
         }
     }
    1. 灏嗘柊寤虹殑缁撴灉鐩戝惉鍣ㄥ洖璋冧笌璇煶璇嗗埆鍣ㄧ粦瀹?/li>
    .setAsrListener(SpeechRecognitionListener());
    1. 閰嶇疆璇嗗埆鍙傛暟锛岃皟鐢ㄥ惎鍔ㄨ闊宠瘑鍒?/li>
    Intent = Intent(MLAsrConstants.);
     .putExtra(MLAsrConstants., language)
             .putExtra(MLAsrConstants., MLAsrConstants.);
    mSpeechRecognizer.startRecognizing(mSpeechRecognizerIntent);
    1. 璇嗗埆瀹屾垚鍚庯紝閲婃斁璧勬簮
    (!= ) {
         .destroy();
         = ;
     }
    maven鍦板潃
    
    buildscript {
         repositories {
             maven { url }
         }
     }
     allprojects {
         repositories {
             maven { url }
         }
     }

    寮曞叆SDK

    dependencies {implementation implementation implementation }

    娓呭崟鏂囦欢

    <...
         < />
         ...
     </>
    
    鏉冮檺
    
    </>
    
    鍔ㄦ€佹潈闄愮敵璇?
    requestCameraPermission() {
         String[] permissions = String[]{Manifest.permission.};
         (!ActivityCompat.(,
                 Manifest.permission.)) { ActivityCompat.(,
                     permissions,
                     TongueTwisterActivity.);
             ;
         }
     }

    鎬荤粨

    闄や簡鍦ㄦ父鎴忓綋涓殑搴旂敤锛屽疄鏃惰闊宠瘑鍒湇鍔″湪浣跨敤璐墿绫籄pp鎼滅储鍟嗗搧鏃讹紝鍙互灏嗚闊虫弿杩扮殑鍟嗗搧鍚嶇О鎴栫壒寰佽瘑鍒负鏂囧瓧浠庤€屾悳绱㈠埌鐩爣鍟嗗搧銆傚悓鏍凤紝鍦ㄤ娇鐢ㄩ煶涔愮被App鏃讹紝鍙互灏嗚闊宠緭鍏ョ殑姝屽悕鎴栨瓕鎵嬭瘑鍒负鏂囧瓧杩涜€屾悳绱㈡瓕鏇层€傚彟澶栵紝鍙告満鍦ㄩ┚椹惰繃绋嬩腑涓嶆柟渚胯緭鍏ユ枃瀛楁椂锛屽彲浠ュ皢杈撳叆鐨勮闊宠浆鎹负鏂囧瓧缁ц€屾悳绱㈢洰鐨勫湴锛岃琛岃溅鏇村姞瀹夊叏銆?/p>

    GitHub Demo Code

    娆蹭簡瑙f洿澶氳鎯咃紝璇峰弬闃咃細

    鍗庝负寮€鍙戣€呰仈鐩熷畼缃戯細
    https://developer.huawei.com/consumer/cn/hms/huawei-mlkit

    鑾峰彇寮€鍙戞寚瀵兼枃妗o細
    https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/service-introduction-0000001050040017

    鍙備笌寮€鍙戣€呰璁鸿鍒癛eddit绀惧尯锛?a href="https://www.reddit.com/r/HuaweiDevelopers/" rel="nofollow">https://www.reddit.com/r/HuaweiDevelopers/

    涓嬭浇demo鍜岀ず渚嬩唬鐮佽鍒癎ithub锛?a href="https://github.com/HMS-Core" rel="nofollow">https://github.com/HMS-Core

    瑙e喅闆嗘垚闂璇峰埌Stack Overflow锛?br/>https://stackoverflow.com/questions/tagged/huawei-mobile-services?tab=Newest

  • 以上是关于Tongue Twister-蹇€熼泦鎴愬崕涓哄疄鏃惰闊宠瘑鍒湇鍔$帺杞粫鍙d护的主要内容,如果未能解决你的问题,请参考以下文章

    鍗曞厓娴嬭瘯锛?锛岄泦鎴愭祴璇曪細0

    铻嶄簯鍗虫椂閫氳SDK闆嗘垚 -- FCM鎺ㄩ€侀泦鎴愭寚鍗?Android骞冲彴)

    Android | 瓒呯畝鍗曢泦鎴怘MS ML Kit瀹炵幇鏈€澶ц劯寰瑧鎶撴媿

    实现 64 位 Mersenne Twister - 定义

    Zephyr单元测试框架:ztest/twister的使用和介绍

    mersenne twister 线程对 cpp 是不是安全