帖子

设置 语音输入超时时间不起作用

[复制链接]

该用户从未签到

3381 买买买 发表于 4 天前 1#
    [_speechRecognizer setParameter"600000" forKey:[IFlySpeechConstant SPEECH_TIMEOUT]];
        
        [_speechRecognizer setParameter:IFLY_AUDIO_SOURCE_MIC forKey"audio_source"];
        
        //set network timeout
        [_speechRecognizer setParameter"600000" forKey:[IFlySpeechConstant NET_TIMEOUT]];
        
        //set sample rate, 16K as a recommended option
        [_speechRecognizer setParameter"16000" forKey:[IFlySpeechConstant SAMPLE_RATE]];
        
        //set language
        [_speechRecognizer setParameter"zh_cn" forKey:[IFlySpeechConstant LANGUAGE]];
        //set accent
        [_speechRecognizer setParameter"mandarin" forKey:[IFlySpeechConstant ACCENT]];
        
        //set whether or not to show punctuation in recognition results
        [_speechRecognizer setParameter"0" forKey:[IFlySpeechConstant ASR_PTT]];
        //Set result type
        [_speechRecognizer setParameter"plain" forKey:[IFlySpeechConstant RESULT_TYPE]];
        
        [_speechRecognizer setParameter"asr.pcm" forKey:[IFlySpeechConstant ASR_AUDIO_PATH]];


设置后不起作用,还是3秒后不说话直接stop了

讯飞2017hj 发表于 3 天前
2#
语音听写最长只支持60s,所以最长只能设置60s。
使用道具 举报 回复