@picovoice/leopard-react-native
Version:
Picovoice Leopard React Native binding
25 lines (24 loc) • 825 B
TypeScript
export type LeopardWord = {
/** Transcribed word. */
word: string;
/** Start of word in seconds. */
startSec: number;
/** End of word in seconds. */
endSec: number;
/** Transcription confidence. It is a number within [0, 1]. */
confidence: number;
/** Speaker tag. It is set to `-1` if speaker diarization is not enabled during initialization. */
speakerTag: number;
};
export type LeopardTranscript = {
/** Inferred transcription. */
transcript: string;
/** Transcribed words and their associated metadata. */
words: LeopardWord[];
};
export type LeopardOptions = {
/** Set to `true` to enable automatic punctuation insertion. */
enableAutomaticPunctuation?: boolean;
/** Set to `true` to enable speaker diarization. */
enableDiarization?: boolean;
};