Back
Version 58
11/27/2024
import { Hono } from "https://deno.land/x/hono@v3.11.7/mod.ts";
import { useRecorderExport } from "https://esm.town/v/yawnxyz/scribeUseRecorderExport";
// Inlined content from ./middleware.ts
import "jsr:@std/dotenv/load"
import { Groq } from "npm:groq-sdk";
const groq = new Groq();
import { HfInference } from "npm:@huggingface/inference";
const hf = new HfInference(Deno.env.get("HUGGINGFACE_API_KEY"));
const MAX_CHUNK_SIZE_BYTES = 25 * 1024 * 1024; // 25 MB in bytes
const DEFAULT_WHISPER_MODEL = 'whisper-large-v3-turbo';
const MAX_TRANSCRIPT_CONTEXT = 3000; // Characters to keep from transcript history
type WhisperModel = 'whisper-large-v3-turbo' | 'distil-whisper-large-v3-en' | 'whisper-large-v3';
type WhisperResponseFormat = 'json' | 'verbose_json' | 'text';
interface TranscriptionParams {
model?: WhisperModel;
prompt?: string;
response_format?: WhisperResponseFormat;
language?: string;
temperature?: number;
}
interface Transcription {
text: string;
segments?: Array<{
start: number;
end: number;
text: string;
}>;
duration?: number;
}
yawnxyz-scribe.web.val.run
Updated: November 27, 2024