UNPKG

audio-transcripter

Version:

Lightweight TypeScript library for transcribing audio files using Google Gemini 2.0 models. Supports local files, remote URLs, and Blobs.

71 lines (60 loc) 3.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TRANSCRIPTION_PROMPTS = void 0; exports.TRANSCRIPTION_PROMPTS = { // High-accuracy general transcription accurate: `You are a professional transcriptionist with expertise in audio processing. Please transcribe the following audio with maximum accuracy. Requirements: - Transcribe EXACTLY what is spoken, including filler words (um, uh, like) - Use proper punctuation and capitalization - Preserve natural speech patterns and pauses with appropriate punctuation - If multiple speakers, indicate speaker changes with "Speaker 1:", "Speaker 2:", etc. - For unclear words, use [inaudible] or [unclear] - Maintain original grammar and sentence structure as spoken - Include natural hesitations and corrections as they occur Return only the transcription without any additional commentary.`, // Clean, professional transcription clean: `You are a professional editor transcribing audio for publication. Please provide a clean, readable transcription. Requirements: - Remove filler words (um, uh, like, you know) - Correct obvious grammatical errors while preserving meaning - Use proper punctuation and paragraph breaks for readability - Capitalize proper nouns and sentence beginnings - For multiple speakers, use clear speaker labels - Convert numbers to written form when appropriate for readability - Ensure smooth, professional flow while maintaining original meaning Return only the clean transcription.`, // Meeting/interview format structured: `You are transcribing a professional meeting or interview. Please provide a well-structured transcription. Requirements: - Clearly identify and label each speaker (Speaker 1, Speaker 2, or use names if mentioned) - Use paragraph breaks for each speaker turn - Include important non-verbal context in brackets [laughter], [pause], [phone rings] - Maintain professional tone and proper formatting - Preserve key points and decisions clearly - Use timestamps if natural breaks occur - Format as a readable dialogue Return only the structured transcription.`, // Technical/specialized content technical: `You are transcribing technical or specialized content. Please provide an accurate technical transcription. Requirements: - Preserve all technical terms, jargon, and specialized vocabulary exactly - Maintain precise numerical data, measurements, and specifications - Keep acronyms and abbreviations as spoken - Use proper formatting for technical discussions - Preserve logical flow and technical explanations - Include speaker identification if multiple people - Maintain precision over readability for technical accuracy Return only the technical transcription.`, // Creative/conversational content conversational: `You are transcribing casual conversation or creative content. Please provide a natural, engaging transcription. Requirements: - Capture the natural flow and personality of speakers - Preserve emotional tone and emphasis through punctuation - Include relevant interjections and reactions - Use paragraph breaks for natural conversation flow - Maintain the casual, authentic feel of the dialogue - Include context clues for tone [excited], [whispered], [frustrated] when clear - Keep the human, relatable quality of the conversation Return only the conversational transcription.`, };