@coursebuilder/core
Version:
Core package for Course Builder
310 lines (306 loc) • 9.87 kB
text/typescript
import { z } from 'zod';
import { T as TranscriptionUserConfig, e as TranscriptionConfig } from '../adapters-DK4L3hbS.cjs';
import '@auth/core/adapters';
import '../schemas/coupon-schema.cjs';
import '../schemas/merchant-coupon-schema.cjs';
import '../schemas/merchant-customer-schema.cjs';
import '../schemas/merchant-product-schema.cjs';
import '../schemas/price-schema.cjs';
import '../schemas/product-schema.cjs';
import '../schemas/purchase-schema.cjs';
import '../schemas/purchase-user-transfer-schema.cjs';
import '../schemas/resource-progress-schema.cjs';
import '../schemas/user-schema.cjs';
import '../schemas/video-resource.cjs';
import '../schemas/upgradable-product-schema.cjs';
import '../schemas/merchant-charge-schema.cjs';
import '../schemas/merchant-price-schema.cjs';
import '../schemas/content-resource-schema.cjs';
import '../schemas/merchant-account-schema.cjs';
import '../schemas/merchant-session.cjs';
import '../schemas/merchant-subscription.cjs';
import '../schemas/organization-member.cjs';
import '../schemas/organization-schema.cjs';
import '../schemas/subscription.cjs';
import '@auth/core';
import '@auth/core/providers/nodemailer';
import 'ai';
import 'cookie';
import 'inngest';
import 'stripe';
import '../lib/utils/logger.cjs';
import '@auth/core/providers';
import '../schemas/subscriber-schema.cjs';
import './partykit.cjs';
import './slack.cjs';
import '../schemas/purchase-info.cjs';
import '../schemas/subscription-info.cjs';
/**
* @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 };