UNPKG

@coursebuilder/core

Version:

Core package for Course Builder

310 lines (306 loc) 9.84 kB
import { z } from 'zod'; import { T as TranscriptionUserConfig, e as TranscriptionConfig } from '../adapters-BjQ3VSch.js'; import '@auth/core/adapters'; import '../schemas/coupon-schema.js'; import '../schemas/merchant-coupon-schema.js'; import '../schemas/merchant-customer-schema.js'; import '../schemas/merchant-product-schema.js'; import '../schemas/price-schema.js'; import '../schemas/product-schema.js'; import '../schemas/purchase-schema.js'; import '../schemas/purchase-user-transfer-schema.js'; import '../schemas/resource-progress-schema.js'; import '../schemas/user-schema.js'; import '../schemas/video-resource.js'; import '../schemas/upgradable-product-schema.js'; import '../schemas/merchant-charge-schema.js'; import '../schemas/merchant-price-schema.js'; import '../schemas/content-resource-schema.js'; import '../schemas/merchant-account-schema.js'; import '../schemas/merchant-session.js'; import '../schemas/merchant-subscription.js'; import '../schemas/organization-member.js'; import '../schemas/organization-schema.js'; import '../schemas/subscription.js'; import '@auth/core'; import '@auth/core/providers/nodemailer'; import 'ai'; import 'cookie'; import 'inngest'; import 'stripe'; import '../lib/utils/logger.js'; import '@auth/core/providers'; import '../schemas/subscriber-schema.js'; import './partykit.js'; import './slack.js'; import '../schemas/purchase-info.js'; import '../schemas/subscription-info.js'; /** * @module providers/deepgram */ /** The returned transcription result from Deepgram when using the callback. */ interface DeepgramTranscriptionResult extends Record<string, any> { srt: string; transcript: string; wordLevelSrt: string; } declare function Deepgram(options: TranscriptionUserConfig): TranscriptionConfig; declare const ParagraphSchema: z.ZodObject<{ text: z.ZodString; sentences: z.ZodArray<z.ZodObject<{ end: z.ZodNumber; start: z.ZodNumber; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; end: number; start: number; }, { text: string; end: number; start: number; }>, "many">; }, "strip", z.ZodTypeAny, { text: string; sentences: { text: string; end: number; start: number; }[]; }, { text: string; sentences: { text: string; end: number; start: number; }[]; }>; type Paragraph = z.infer<typeof ParagraphSchema>; declare const WordSchema: z.ZodObject<{ word: z.ZodString; start: z.ZodNumber; end: z.ZodNumber; confidence: z.ZodNumber; punctuated_word: z.ZodString; }, "strip", z.ZodTypeAny, { end: number; start: number; word: string; confidence: number; punctuated_word: string; }, { end: number; start: number; word: string; confidence: number; punctuated_word: string; }>; type Word = z.infer<typeof WordSchema>; declare const DeepgramResultsSchema: z.ZodObject<{ channels: z.ZodArray<z.ZodObject<{ alternatives: z.ZodArray<z.ZodObject<{ transcript: z.ZodString; paragraphs: z.ZodOptional<z.ZodObject<{ paragraphs: z.ZodArray<z.ZodObject<{ text: z.ZodString; sentences: z.ZodArray<z.ZodObject<{ end: z.ZodNumber; start: z.ZodNumber; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; end: number; start: number; }, { text: string; end: number; start: number; }>, "many">; }, "strip", z.ZodTypeAny, { text: string; sentences: { text: string; end: number; start: number; }[]; }, { text: string; sentences: { text: string; end: number; start: number; }[]; }>, "many">; }, "strip", z.ZodTypeAny, { paragraphs: { text: string; sentences: { text: string; end: number; start: number; }[]; }[]; }, { paragraphs: { text: string; sentences: { text: string; end: number; start: number; }[]; }[]; }>>; words: z.ZodArray<z.ZodObject<{ word: z.ZodString; start: z.ZodNumber; end: z.ZodNumber; confidence: z.ZodNumber; punctuated_word: z.ZodString; }, "strip", z.ZodTypeAny, { end: number; start: number; word: string; confidence: number; punctuated_word: string; }, { end: number; start: number; word: string; confidence: number; punctuated_word: string; }>, "many">; }, "strip", z.ZodTypeAny, { transcript: string; words: { end: number; start: number; word: string; confidence: number; punctuated_word: string; }[]; paragraphs?: { paragraphs: { text: string; sentences: { text: string; end: number; start: number; }[]; }[]; } | undefined; }, { transcript: string; words: { end: number; start: number; word: string; confidence: number; punctuated_word: string; }[]; paragraphs?: { paragraphs: { text: string; sentences: { text: string; end: number; start: number; }[]; }[]; } | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { alternatives: { transcript: string; words: { end: number; start: number; word: string; confidence: number; punctuated_word: string; }[]; paragraphs?: { paragraphs: { text: string; sentences: { text: string; end: number; start: number; }[]; }[]; } | undefined; }[]; }, { alternatives: { transcript: string; words: { end: number; start: number; word: string; confidence: number; punctuated_word: string; }[]; paragraphs?: { paragraphs: { text: string; sentences: { text: string; end: number; start: number; }[]; }[]; } | undefined; }[]; }>, "many">; }, "strip", z.ZodTypeAny, { channels: { alternatives: { transcript: string; words: { end: number; start: number; word: string; confidence: number; punctuated_word: string; }[]; paragraphs?: { paragraphs: { text: string; sentences: { text: string; end: number; start: number; }[]; }[]; } | undefined; }[]; }[]; }, { channels: { alternatives: { transcript: string; words: { end: number; start: number; word: string; confidence: number; punctuated_word: string; }[]; paragraphs?: { paragraphs: { text: string; sentences: { text: string; end: number; start: number; }[]; }[]; } | undefined; }[]; }[]; }>; type DeepgramResults = z.infer<typeof DeepgramResultsSchema>; declare function srtFromTranscriptResult(results: DeepgramResults): string; declare function wordLevelSrtFromTranscriptResult(results: DeepgramResults): string; declare function transcriptAsParagraphsWithTimestamps(results: DeepgramResults): string; declare function srtProcessor(words?: Word[], toWordLevelTimestamps?: boolean): string; export { type DeepgramResults, DeepgramResultsSchema, type DeepgramTranscriptionResult, type Paragraph, ParagraphSchema, type Word, WordSchema, Deepgram as default, srtFromTranscriptResult, srtProcessor, transcriptAsParagraphsWithTimestamps, wordLevelSrtFromTranscriptResult };