UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

48 lines (47 loc) • 1.72 kB
/** * Azure Cognitive Services Speech-to-Text Handler * * Implementation of STT using Azure Speech Services. * * @module voice/providers/AzureSTT */ import type { TTSAudioFormat, STTHandler, STTLanguage, STTOptions, STTResult, TranscriptionSegment } from "../../types/index.js"; /** * Azure Cognitive Services Speech-to-Text Handler * * Supports speech recognition with custom models and detailed output. * * @see https://docs.microsoft.com/azure/cognitive-services/speech-service/ */ export declare class AzureSTT implements STTHandler { private readonly apiKey; private readonly region; /** * Maximum audio duration in seconds (60s — Azure's REST API for short audio * documented limit on `/speech/recognition/conversation/cognitiveservices/v1`). * For longer audio, use Azure Batch Transcription (not yet implemented) or * pre-segment the input. */ readonly maxAudioDuration = 60; /** * Azure STT implementation buffers chunks via REST — not true streaming */ readonly supportsStreaming = false; constructor(apiKey?: string, region?: string); isConfigured(): boolean; getSupportedFormats(): TTSAudioFormat[]; getSupportedLanguages(): Promise<STTLanguage[]>; transcribe(audio: Buffer | ArrayBuffer, options?: STTOptions): Promise<STTResult>; /** * Streaming transcription (placeholder - requires SDK) */ transcribeStream(audioStream: AsyncIterable<Buffer>, options: STTOptions): AsyncIterable<TranscriptionSegment>; /** * Get Content-Type header for audio format */ private getContentType; /** * Convert Azure ticks (100ns units) to seconds */ private ticksToSeconds; }