xfyun-sdk
Version:
科大讯飞语音识别 SDK,支持浏览器中实时语音听写功能
25 lines (24 loc) • 733 B
TypeScript
import React from 'react';
export interface SpeechRecognizerProps {
appId: string;
apiKey: string;
apiSecret: string;
language?: 'zh_cn' | 'en_us';
domain?: 'iat' | 'medical' | 'assistant';
accent?: 'mandarin' | 'cantonese';
hotWords?: string[];
punctuation?: boolean;
autoStart?: boolean;
onStart?: () => void;
onStop?: () => void;
onResult?: (text: string, isEnd: boolean) => void;
onError?: (error: any) => void;
className?: string;
buttonClassName?: string;
buttonStartText?: string;
buttonStopText?: string;
showVolume?: boolean;
showStatus?: boolean;
}
declare const SpeechRecognizer: React.FC<SpeechRecognizerProps>;
export default SpeechRecognizer;