Speech To Text System Prompt Library

April 7, 2025 ยท View on GitHub

Streamlit App

This repository provides a collection of system prompts designed to transform and refine text captured using speech-to-text technologies.

By passing STT outputs through large language models with these specialized prompts, you can achieve cleaner, more structured, and purpose-specific text formats.

๐Ÿ“‹ The Idea

Here is the basic implementation. I don't pretend that this is the stuff of high AI engineering. But it does create quite inefficient workflow.

The basic model is like this:

alt text

The prompt stacks combine the different elements so that the LLM has as a detailed picture of the desired format of the text it must produce from the STT input:

alt text


๐Ÿ”„ The MCP Angle

The text transformation "agent" also provides an excellent opportunity to optimize this workflow for use with MCP.

"Agent 2" could take the reformatted text and restructure it as JSON.

Or the prior/main agent can be rewritten to also direct a specific structured output.

For example, an email composition configuration can be configured to output to JSON and provide specific elements for the email subject line, body text, and recipient email(s).


๐Ÿ”— Example Prompt Stacks

Here are a couple of examples of how the constituent elements in the various system prompt snippets here can be put together:

Stack 1: Business Correspondence Stack

LayerPrompt ComponentFunction
1Basic CleanupFoundation for all transformations
2Format as Business CorrespondenceApply business document structure
3Decisive ToneAdd authoritative, clear language
4Business StructureOrganize content with professional formatting
5Business Email SignatureAdd formal closing and signature block

Stack 2: Personal Communication Stack

LayerPrompt ComponentFunction
1Basic CleanupFoundation for all transformations
2Friendly ToneAdd warm, approachable language
3Personal SignatureAdd casual closing and signature

The prompt combiner script makes it easy to build these stacks by selecting the components you need and automatically layering them in the correct order.


๐Ÿ“š System Prompts Navigation

These are the various prompts and their categories in this repository.

The basis prompt is intended to provide a baseline level of text cleaning. And the other prompts provide supplementation.

The exception is the prompts that directs a JSON output directly.

๐Ÿ” Basic Prompts - Foundational prompts for initial text cleanup and transformation
PromptDescription
Basic CleanupThe foundation prompt for all STT transformations
๐Ÿ’ผ Business Correspondence - Prompts for transforming speech into professional business communications
PromptDescription
Budget RequestFormat text as a budget request
Business ProposalFormat text as a business proposal
Quote RequestFormat text as a quote request
Remote Job ApplicationFormat text as a remote job application
Specific Job ApplicationFormat text as a specific job application
๐Ÿ”Ž Job Seeking - Prompts specifically designed for job application and career advancement communications
PromptDescription
Interview Thank YouFormat text as an interview thank you note
Job Speculative PitchFormat text as a speculative job application
๐Ÿ“Š Project Management - Prompts for effective project-related communications and documentation
PromptDescription
Meeting MinutesFormat text as meeting minutes
Project BriefFormat text as a project brief
Project Status UpdateFormat text as a project status update
Task ListFormat text as a task list
Weekly ReportFormat text as a weekly report
๐Ÿ“ Format - General formatting prompts to structure speech into specific document types
PromptDescription
Acronym ExpansionExpand acronyms in the text
Blog OutlineFormat text as a blog post outline
Bullet PointsFormat text as bullet points
EmailFormat text as an email
English ImprovementImprove English language usage
Fact IdentificationIdentify facts in the text
Internal EmailFormat text as an internal company email
InvitationFormat text as an invitation
LinkedIn PostFormat text as a LinkedIn post
Meeting AgendaFormat text as a meeting agenda
Numbered ListFormat text as a numbered list
OutlineFormat text as an outline
Paragraph StructureApply proper paragraph structure
Press ReleaseFormat text as a press release
Pros and ConsFormat text as pros and cons
Social Media PostFormat text as a social media post
SummarySummarize the text
System PromptFormat text as an AI system prompt
User PromptFormat text as an AI user prompt
๐Ÿ“„ Business Docs - Prompts for transforming speech into formal business documents
PromptDescription
Business ProposalFormat text as a formal business proposal
Cold PitchFormat text as a cold pitch
Cover LetterFormat text as a cover letter
Executive SummaryFormat text as an executive summary
Formal ComplaintFormat text as a formal complaint
Job DescriptionFormat text as a job description
MemoFormat text as a memo
NewsletterFormat text as a newsletter
Press ReleaseFormat text as a press release
Product DescriptionFormat text as a product description
Project ProposalFormat text as a project proposal
Request for ProposalFormat text as a request for proposal
White PaperFormat text as a white paper
โœ๏ธ Signature - Prompts for adding appropriate signature blocks to communications
PromptDescription
Business SignatureAdd a business email signature
Personal SignatureAdd a personal email signature
๐Ÿ”„ Simplification - Prompts for simplifying complex text into easier-to-understand formats
PromptDescription
System PromptSimplify complex text
๐ŸŽจ Style - Prompts for applying specific writing styles to transformed text
PromptDescription
Academic StyleApply academic writing style
Casual StyleApply casual writing style
Concise StyleApply concise writing style
Creative StyleApply creative writing style
Descriptive StyleApply descriptive writing style
Formal StyleApply formal writing style
Persuasive StyleApply persuasive writing style
Professional StyleApply professional writing style
Technical StyleApply technical writing style
๐Ÿ—ฃ๏ธ Tone - Prompts for setting the emotional tone of transformed text
PromptDescription
Authoritative ToneApply authoritative tone to text
Business ToneApply business tone to text
Formal ToneApply formal tone to text
Friends & Family ToneApply casual tone for friends and family
Informal ToneApply informal tone to text
Professional ToneApply professional tone to text

๐Ÿ”„ Basic Transformation Model

The basic transformation model follows a structure like this.

Consider the case of a user who uses Open AI Whisper in order to transcribe their text.

The user dictates:

Hi John quick status update project is finished now I'll see you in the office at three best user

Whisper transcribes this as:

Hi John, quick status update. Project is finished now. I'll see you in the office at three. Best, User

The speech to text model is focused on doing one job well (transcription). But it may lack context to know that the person named John is the user's boss and that the ultimate objective of this transcription is to generate an internal email.

By passing the transcribed text through a large language model with a specialized system prompt, we can transform it into a properly formatted internal email:

Subject: Project Completion Status Update

Hi John,

I wanted to provide a quick status update. The project has been successfully completed.

I'll be in the office at 3:00 PM if you'd like to discuss any details.

Best regards,
[User's Name]

This transformation adds:

  • A relevant subject line
  • Proper email formatting with greeting and signature
  • Expanded and clarified content
  • Professional language appropriate for internal business communication

๐Ÿ’ก Key Transformation Features

FeatureDescription
Format DetectionThe model identifies the intended format (email, report, list, etc.)
Tone AdjustmentText is adjusted to match the appropriate tone (formal, casual, etc.)
Structure AdditionMissing structural elements are added (subject lines, headers, etc.)
Sentence StructureMissing sentence structure is inferred and properly formatted
Typo CorrectionObvious typos and speech recognition errors are corrected
Instruction FilteringText reformatting instructions contained in the dictated text (e.g., "don't include that") are processed and removed
Coherence EnhancementThe model applies basic edits for improved readability and coherence
Readability ImprovementsAdditional edits to improve overall text readability and flow

๐Ÿงน Basic Cleanup Prompt Text

# System Prompt For Basic Text Cleanup

You are a helpful writing assistant. 

Your task is to take text which was captured by the user using speech to text. 

You will reformat the text by remedying defects and applying basic edits for clarity and intelligibility.

Apply these edits to the text:

## Edits

- If you can infer obvious typos, then resolve them. For example, if the transcript contains "I should search for that on Doogle," you can rewrite that as: "I should search for that on Google"

- Add missing punctuation. 

- Add missing paragraph breaks. Assume that the text should be divided into short paragraphs of a few sentences each for optimized reading on digital devices. 

- If the dictated text contains instructions from the user for how to reformat or edit the text, then you should infer those to be instructions and apply those to the text. For instance, if the dictated text contains: "Actually, let's get rid of that last sentence",  You would apply the contained instruction of removing the last sentence and not including the editing remark in the outputted text. 

## Workflow

Adhere to the following workflow. 

- The user will provide the text. 
- Apply your edits.  
- Return the improved edited text to the user. Do not add any text before or after your output. 

I apply this Basic Text Cleanup prompt to all speech-to-text captured content. Then I create additional system prompts for reformatting the text into specific formats and add these on top of the basic system prompt.

In other words, if I want to select a system prompt for the specific purpose of sending business emails, I'll write a specific prompt with formatting instructions for business emails, include my personal email signature, and append that onto the basic system prompt. This way, the text transformation for business emails will first apply basic text cleanup and then format it for the specific purpose.


๐Ÿ› ๏ธ Prompt Combiner Script

To facilitate the creation of combined system prompts, this repository includes a prompt_combiner.py script that automates the process. The script allows you to:

  1. Browse all available prompts categorized by their purpose (format, tone, signature, etc.)
  2. Select multiple prompts to combine
  3. Automatically layer them on top of the basic cleanup prompt
  4. Save the combined system prompt for future use

To use the script, simply run:

python prompt_combiner.py

The interactive menu will guide you through selecting and combining prompts. The final output will be saved in a custom-system-prompts folder with appropriate metadata.

This tool serves as a practical model for implementing the prompt layering concept described above, making it easy to create specialized text transformation prompts for different use cases.


๐Ÿ“Š Text To JSON Transformations

One of these cases for speech AI that I'm most interested in and I'm currently exploring is the idea of using transformations like these to convert Text containing structured data or data that could be structured and converting it into structured format by using a JSON schema.

Examples of applications in this domain include the following:

  • Take the users dictated task list and output it as a JSON array. Then use an MCP server for a task list manager in order to create those tasks in the user's preferred task management system.

  • Take the user's dictators, edit to their weekly diary or daily diary and likewise produce it as JSON that can be then passed to an MCP calendar server.

alt text