UNPKG

@langchain/community

Version:
1 lines • 1.71 kB
{"version":3,"file":"sonix_audio.d.cts","names":["SpeechToTextRequest","Document","BaseDocumentLoader","SonixAudioTranscriptionLoader","sonixAuthKey","speechToTextRequest","Promise"],"sources":["../../../src/document_loaders/web/sonix_audio.d.ts"],"sourcesContent":["import { SpeechToTextRequest } from \"sonix-speech-recognition/lib/types.js\";\nimport { Document } from \"@langchain/core/documents\";\nimport { BaseDocumentLoader } from \"@langchain/core/document_loaders/base\";\n/**\n * A class that represents a document loader for transcribing audio files\n * using the Sonix Speech Recognition service.\n * @example\n * ```typescript\n * const loader = new SonixAudioTranscriptionLoader({\n * sonixAuthKey: \"SONIX_AUTH_KEY\",\n * request: {\n * audioFilePath: \"LOCAL_AUDIO_FILE_PATH\",\n * fileName: \"FILE_NAME\",\n * language: \"en\",\n * },\n * });\n * const docs = await loader.load();\n * ```\n */\nexport declare class SonixAudioTranscriptionLoader extends BaseDocumentLoader {\n private readonly sonixSpeechRecognitionService;\n private readonly speechToTextRequest;\n constructor({ sonixAuthKey, request: speechToTextRequest }: {\n sonixAuthKey: string;\n request: SpeechToTextRequest;\n });\n /**\n * Performs the speech-to-text transcription using the\n * SonixSpeechRecognitionService and returns the transcribed text as a\n * Document object.\n * @returns An array of Document objects containing the transcribed text.\n */\n load(): Promise<Document[]>;\n}\n//# sourceMappingURL=sonix_audio.d.ts.map"],"mappings":";;;;;;;;AAmBA;;;;;;;AAA6E;;;;;;;cAAxDG,6BAAAA,SAAsCD,kBAAAA;;;;;aAGlBG;;;aAExBL;;;;;;;;UAQLM,QAAQL"}