类 AILocalWakeupIncrementIntent


  • public class AILocalWakeupIncrementIntent
    extends java.lang.Object
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      java.lang.String getBlackWords()
      获取黑名单
      java.util.Map<java.lang.String,​java.lang.Double> getCustomThreshold()
      获取自定义的词表
      double getEnglishThreshold()  
      double getFillerPenaltyScore()  
      boolean getIsIgnoreThreshold()  
      int getMaxSpeechTime()
      获取单词允许最大录音时长,单位 s
      int getNoSpeechTime()
      获取NoSpeechTime
      java.lang.String getSaveAudioPath()
      获取音频保存路径
      double getThreshold()
      获取热词置信度阈值
      java.lang.String getWords()
      获取词表
      boolean isUseContinuousRecognition()
      是否支持连续识别,默认打开
      boolean isUseFiller()  
      void setBlackWords​(java.lang.String[] blackWords)
      设置热词黑名单
      void setCustomThreshold​(java.lang.String[] words, java.lang.Double[] threshold)
      自定义单词置信度阈值
      void setEnglishThreshold​(double englishThreshold)  
      void setFillerPenaltyScore​(double fillerPenaltyScore)
      根据误唤醒集合设置的值
      void setIsIgnoreThreshold​(boolean isIgnoreThreshold)
      设置是否忽略阈值,不管kernel返回的结果是大于还是小于阈值,都将结果返回给上层
      void setMaxSpeechTime​(int maxSpeechTime)
      设置音频最大录音时长,达到该值将取消语音引擎并抛出异常
      允许的最大录音时长 单位秒 0 表示无最大录音时长限制 默认大小为10S 须在start之前设置才生效
      void setNoSpeechTime​(int noSpeechTime)
      设置启动识别后无人声输入最大录音时常,到达该值后将跑出异常 默认 0 s ,热词引擎不开启此配置
      void setSaveAudioPath​(java.lang.String path)
      设置音频文件存储路径,release 版本建议关闭
      void setThreshold​(double threshold)
      设置置信度阈值
      void setUseContinuousRecognition​(boolean useContinuousRecognition)
      设置是否开启连续识别,默认 true start之前设置有效
      void setUseFiller​(boolean useFiller)
      设置是否使用解码网络里增加的filler路径
      void setWords​(java.lang.String words)
      直接按照内核既定格式设置词表如: \"打开副屏,打开今日头条\"
      void setWords​(java.lang.String[] words)
      设置词表
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • AILocalWakeupIncrementIntent

        public AILocalWakeupIncrementIntent()
    • 方法详细资料

      • setIsIgnoreThreshold

        public void setIsIgnoreThreshold​(boolean isIgnoreThreshold)
        设置是否忽略阈值,不管kernel返回的结果是大于还是小于阈值,都将结果返回给上层
      • getIsIgnoreThreshold

        public boolean getIsIgnoreThreshold()
      • setUseContinuousRecognition

        public void setUseContinuousRecognition​(boolean useContinuousRecognition)
        设置是否开启连续识别,默认 true start之前设置有效
        参数:
        useContinuousRecognition - useContinuousRecognition
      • setMaxSpeechTime

        public void setMaxSpeechTime​(int maxSpeechTime)
        设置音频最大录音时长,达到该值将取消语音引擎并抛出异常
        允许的最大录音时长 单位秒
        • 0 表示无最大录音时长限制
        • 默认大小为10S
        须在start之前设置才生效
        参数:
        maxSpeechTime - 最大人声时长
      • setNoSpeechTime

        public void setNoSpeechTime​(int noSpeechTime)
        设置启动识别后无人声输入最大录音时常,到达该值后将跑出异常 默认 0 s ,热词引擎不开启此配置
        参数:
        noSpeechTime - 无人声时常
      • setSaveAudioPath

        public void setSaveAudioPath​(java.lang.String path)
        设置音频文件存储路径,release 版本建议关闭
        参数:
        path - 文件路径
      • setWords

        public void setWords​(java.lang.String[] words)
        设置词表
        参数:
        words - 词表
      • setWords

        public void setWords​(java.lang.String words)
        直接按照内核既定格式设置词表如: \"打开副屏,打开今日头条\"
        参数:
        words - 内核词表
      • setBlackWords

        public void setBlackWords​(java.lang.String[] blackWords)
        设置热词黑名单
        参数:
        blackWords - 黑名单词表
      • setThreshold

        public void setThreshold​(double threshold)
        设置置信度阈值
        参数:
        threshold - 阈值
      • setEnglishThreshold

        public void setEnglishThreshold​(double englishThreshold)
      • setCustomThreshold

        public void setCustomThreshold​(java.lang.String[] words,
                                       java.lang.Double[] threshold)
        自定义单词置信度阈值
        参数:
        words - 词表
        threshold - 阈值
      • getNoSpeechTime

        public int getNoSpeechTime()
        获取NoSpeechTime
        返回:
        int
      • getThreshold

        public double getThreshold()
        获取热词置信度阈值
        返回:
        double
      • getEnglishThreshold

        public double getEnglishThreshold()
      • getMaxSpeechTime

        public int getMaxSpeechTime()
        获取单词允许最大录音时长,单位 s
        返回:
        int
      • getWords

        public java.lang.String getWords()
        获取词表
        返回:
        String[]
      • getSaveAudioPath

        public java.lang.String getSaveAudioPath()
        获取音频保存路径
        返回:
        String
      • isUseContinuousRecognition

        public boolean isUseContinuousRecognition()
        是否支持连续识别,默认打开
        返回:
        boolean
      • getBlackWords

        public java.lang.String getBlackWords()
        获取黑名单
        返回:
        string
      • getCustomThreshold

        public java.util.Map<java.lang.String,​java.lang.Double> getCustomThreshold()
        获取自定义的词表
        返回:
        Map
      • isUseFiller

        public boolean isUseFiller()
      • setUseFiller

        public void setUseFiller​(boolean useFiller)
        设置是否使用解码网络里增加的filler路径
        参数:
        useFiller - 默认不开启
      • getFillerPenaltyScore

        public double getFillerPenaltyScore()
      • setFillerPenaltyScore

        public void setFillerPenaltyScore​(double fillerPenaltyScore)
        根据误唤醒集合设置的值
        参数:
        fillerPenaltyScore - 默认 1.5,可根据实际情况再调整