feat: 发布2.8版本

This commit is contained in:
chenchun
2025-12-17 12:10:24 +08:00
parent 2714a507d9
commit 6f1efafd86
78 changed files with 12043 additions and 92 deletions

View File

@@ -0,0 +1,44 @@
/// <reference types="dom-speech-recognition" />
declare interface SpeechRecognition {
continuous: boolean;
interimResults: boolean;
lang: string;
onresult: (event: SpeechRecognitionEvent) => void;
onstart: () => void;
onend: () => void;
onerror: (event: SpeechRecognitionError) => void;
start: () => void;
stop: () => void;
}
declare interface SpeechRecognitionEvent {
results: SpeechRecognitionResultList;
resultIndex: number;
}
declare interface SpeechRecognitionResultList {
[index: number]: SpeechRecognitionResult;
length: number;
}
declare interface SpeechRecognitionResult {
[index: number]: SpeechRecognitionAlternative;
length: number;
isFinal: boolean;
}
declare interface SpeechRecognitionAlternative {
confidence: number;
transcript: string;
}
declare interface SpeechRecognitionError {
error: string;
message: string;
}
declare const webkitSpeechRecognition: {
new (): SpeechRecognition;
prototype: SpeechRecognition;
};