Executive Summary This whitepaper presents a lightweight, self‑hosted voice dictation web application designed for users who require fast, private, and accessible speech‑to‑text functionality. Built on the Web Speech API with a PHP and SQLite backend, the application enables real‑time voice transcription directly in the browser, with all data stored locally on the user’s server—no third‑party cloud services, no data harvesting, and no recurring fees. The system addresses a critical gap in the market: while commercial voice dictation tools offer powerful features, they often require subscriptions, send audio data to external servers, and lack transparency in data handling. This application provides a sovereign alternative that puts users in full control of their voice data. New in this version: Integrated page translation (powered by Google Translate’s widget, but fully hidden from the user interface) allows the entire application to be rendered in any of five languages (English, Spanish, French, German, Portuguese), while maintaining the original dictation language choices on the recording page. A dual‑dropdown interface on the dictation page separates speech recognition language (for the user’s spoken words) from interface translation language (for the displayed text), offering an unprecedented level of linguistic flexibility without compromising privacy or simplicity. --- 1. Introduction Voice dictation has emerged as a transformative input method, with studies showing it can be up to four times faster than manual typing. The Web Speech API, a W3C standard, enables web developers to incorporate speech recognition and synthesis directly into web pages without external libraries. However, most commercial implementations rely on cloud‑based processing, raising privacy concerns and creating dependency on third‑party services. The application described in this whitepaper leverages the Web Speech API’s browser‑based speech recognition capabilities while maintaining complete data sovereignty through a self‑hosted architecture. It is designed for individuals, small teams, and organizations that prioritize privacy, simplicity, and cost‑effectiveness. A recent enhancement adds on‑the‑fly page translation using a hidden Google Translate integration. This allows users to view the entire interface—including transcribed text from the database—in their preferred language, without any visible Google branding or pop‑ups. The translation is triggered via a dedicated dropdown, distinct from the speech‑recognition language selector, enabling users to dictate in one language and read the interface in another. --- 2. Technical Architecture 2.1 Overview The application follows a minimalist three‑tier architecture: Tier Component Technology Frontend User Interface HTML5, CSS3, Vanilla JavaScript Speech Processing Speech Recognition Web Speech API (SpeechRecognition) Translation Layer Page Translation Google Translate Widget (invisible) Backend Data Persistence PHP 7+, SQLite3 Deployment Web Server Apache / Nginx (LAMP‑compatible) 2.2 Frontend: Browser‑Based Speech Recognition The application uses the SpeechRecognition interface, which is supported in Chromium‑based browsers (Chrome, Edge, Brave, Opera). Key implementation features include: · Real‑time transcription: The interimResults property enables incremental transcription, providing immediate visual feedback as the user speaks. · Multi‑language support: The lang property allows users to select from eight languages (English, Spanish, French, German, Italian, Portuguese, Japanese, Chinese), with the setting persisted in localStorage. · Session management: Continuous dictation with automatic phrase detection and configurable stop behaviour. 2.3 Translation Layer (New) The application integrates Google Translate’s free website translation widget, but hides all visible UI elements (banner, dropdown, frame) through aggressive CSS rules. The widget is loaded asynchronously and initialised with a minimal set of supported languages. A separate dropdown in the user interface sets a cookie (googtrans) that instructs the widget to translate the entire page into the selected language upon reload. This approach: · Requires no API key or billing. · Translates all static text, dynamically generated content (from the database), and even the live transcript feed. · Does not store any transcript data on Google’s servers—the translation occurs in‑browser using cached models. · Preserves the original language of the transcribed text for storage, while displaying it in the user’s preferred language. 2.4 Backend: Lightweight Data Persistence The server‑side component is built on PHP with SQLite3, offering: · Zero configuration: SQLite requires no separate database server, making deployment trivial on any shared hosting environment. · Automatic table creation: The database schema is initialised on first access, eliminating setup steps. · Geolocation tagging: Optional location data can be captured and stored with each transcript, enabling contextual organisation. · RESTful API: A single save.php endpoint accepts POST requests with transcript data and returns JSON responses. 2.5 Data Flow 1. User clicks the record button and speaks into the microphone. 2. The browser’s speech recognition engine transcribes speech in real time. 3. Upon phrase completion or manual stop, the transcript is sent via FormData to the backend. 4. The PHP endpoint validates, sanitises, and stores the transcript in SQLite. 5. The frontend updates the session feed without requiring a page reload. 6. If page translation is active, the displayed text is automatically translated by the hidden Google Translate engine on each page load. --- 3. Key Features 3.1 Real‑Time Transcription The application provides immediate visual feedback through the onresult event handler, displaying both interim (in‑progress) and final transcription results. This enables users to see their words appear as they speak, reducing cognitive load and improving accuracy. 3.2 Session Feed All transcripts are displayed chronologically within the dictation interface, creating a running log of the current session. This feed updates dynamically after each successful save, providing immediate confirmation without page refresh. 3.3 Geographic Context Optional geolocation data can be captured and stored with each transcript, enabling location‑based organisation and recall. This feature is particularly useful for field workers, journalists, and researchers who need to associate notes with specific places. 3.4 Multi‑Language Speech Recognition Users can select their preferred dictation language from a dropdown menu. The selection is stored in localStorage and applied to subsequent recognition sessions. Supported languages include: · English (en‑US) · Spanish (es‑ES) · French (fr‑FR) · German (de‑DE) · Italian (it‑IT) · Portuguese (pt‑PT) · Japanese (ja‑JP) · Chinese (zh‑CN) 3.5 Page Translation (New) A dedicated dropdown (positioned top‑left on the dictation page, top‑right on the feed page) allows users to instantly translate the entire interface—including all transcribed entries—into one of five languages: · English · Spanish · French · German · Portuguese The translation is powered by Google Translate but completely invisible; no Google branding, pop‑ups, or UI elements are shown. The translation is applied on page reload, ensuring that the user’s chosen language persists across visits. This feature is optional and can be disabled by not including the translation script or by removing the dropdown. 3.6 Dual‑Language Workflow on the Dictation Page The dictation page (mind.php) now features two separate dropdowns: · Left dropdown: Controls page translation (UI language). · Right dropdown: Controls speech recognition language (dictation language). This separation allows, for example, a user to dictate in Spanish (right dropdown) while viewing the interface in English (left dropdown), or vice versa. This dual‑language capability is invaluable for multilingual users, language learners, and international teams. 3.7 Persistent Storage All transcripts are stored in a SQLite database with the following schema: ```sql CREATE TABLE transcripts ( id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT NOT NULL, transcript TEXT NOT NULL, geolocation TEXT, file_name TEXT, created_at DATETIME DEFAULT CURRENT_TIMESTAMP ); ``` 3.8 Public Feed A separate feed page (index.php) displays all stored transcripts in reverse chronological order, with transcript content displayed prominently and metadata (timestamp, location) shown below in a minimal format. This page also inherits the page translation feature, making the entire history accessible in the user’s preferred language. --- 4. Privacy and Security 4.1 Data Sovereignty Unlike commercial voice dictation services that transmit audio to external servers for processing, this application processes speech entirely within the user’s browser. The Web Speech API in Chrome sends audio to Google’s servers for transcription, but critically: · No audio is stored on any external server beyond the transient processing required for transcription. · All transcripts are stored locally on the user’s own server infrastructure. · No third‑party APIs are required for core dictation functionality. Regarding the translation feature: Google Translate’s widget may send page text to Google’s servers to perform translation. However, this is a user‑opt‑in feature; if a user does not select a translation language, no data is sent. Moreover, the translation occurs at the display level only—the underlying database remains unchanged and unshared. 4.2 Self‑Hosted Control By deploying the application on their own infrastructure, users maintain complete control over: · Data retention policies · Backup and recovery procedures · Access controls and authentication (can be added via .htaccess or similar) · Compliance with regional data protection regulations (GDPR, CCPA, etc.) 4.3 Minimal Data Collection The application collects only the data explicitly provided by the user: · Transcript text (the primary content) · Optional geolocation data (user consent required via browser prompt) · Timestamp of creation No analytics, telemetry, or usage tracking is implemented. The translation feature does not add any permanent storage or tracking. --- 5. Use Cases 5.1 Personal Note‑Taking Individuals can use the application for daily journaling, brainstorming, and capturing ideas without the friction of typing. The session feed provides an immediate record of thoughts. The translation feature allows users to view their notes in their native language even when dictating in a different one. 5.2 Field Research and Journalism Researchers and journalists working in the field can dictate observations, interviews, and notes, with optional geolocation tagging providing valuable contextual metadata. The page translation helps international collaborators read the notes in their own language. 5.3 Accessibility Users with motor impairments or conditions that make typing difficult can use voice as their primary input method. The simple, clean interface minimises cognitive load. The translation feature broadens accessibility for non‑native speakers. 5.4 Multilingual Workflows Professionals working in multilingual environments can switch between languages seamlessly, with the recognition engine adapting to each language’s phonetics and grammar. The dual‑dropdown design enables a workflow where the interface language differs from the spoken language—ideal for language learning or cross‑cultural teams. 5.5 Team Collaboration Small teams can deploy the application on a shared server, creating a centralized repository of voice notes accessible to all members. The translation feature ensures that team members who speak different languages can all read the same notes in their preferred language. --- 6. Deployment and Maintenance 6.1 System Requirements · Web Server: Apache or Nginx with PHP 7.0+ · Storage: SQLite3 (included with PHP) · Browser: Chromium‑based (Chrome, Edge, Brave, Opera) for speech recognition; translation works on all modern browsers. · Disk Space: Minimal (< 10 MB for application code) 6.2 Installation 1. Upload the application files (index.php, mind.php, save.php) to the web server. 2. Ensure the web server has write permissions to the application directory (for SQLite database creation). 3. Access mind.php in a Chromium‑based browser. 4. Grant microphone permissions when prompted. 5. (Optional) To enable translation, the application includes the Google Translate widget script by default; no additional setup is required. 6.3 Maintenance · Database backups: The transcripts.db file can be backed up manually or via cron jobs. · Updates: The application is self‑contained; updates require replacing the PHP files. · Scaling: For high‑volume usage, consider migrating to MySQL/PostgreSQL and implementing user authentication. · Translation: The Google Translate widget may be removed entirely by deleting the script include and the associated CSS, if not desired. --- 7. Comparison with Commercial Alternatives Feature This Application Commercial STT Services Cost Free (self‑hosted) Subscription‑based Data Location User‑controlled server Third‑party cloud Audio Processing Browser (transient) External servers Data Retention User‑defined Vendor‑defined Customisation Full (open source) Limited Internet Required For transcription only (and optional translation) Yes (always) Multi‑Language Recognition 8 languages Varies Interface Translation Built‑in (optional, free) Usually not included or extra cost Privacy High (no analytics, no telemetry) Often opaque --- 8. Conclusion The voice dictation web application presented in this whitepaper demonstrates that powerful, privacy‑respecting speech‑to‑text functionality can be delivered with minimal infrastructure and zero recurring costs. By leveraging the Web Speech API and a lightweight PHP/SQLite backend, the system provides: · Real‑time transcription with immediate visual feedback · Complete data sovereignty through self‑hosted storage · Multi‑language support for diverse user bases · Simple deployment on any LAMP‑compatible hosting · Extensibility for additional features (authentication, search, export) The recent addition of an invisible page translation layer—driven by the Google Translate widget—enhances accessibility and usability without sacrificing the core principles of privacy and control. The dual‑dropdown interface on the dictation page sets a new standard for linguistic flexibility, allowing users to separate the language they speak from the language they read. As voice interfaces continue to proliferate across industries, the demand for privacy‑first, self‑hosted solutions will only grow. This application provides a reference implementation that balances functionality, privacy, and simplicity—proving that users need not sacrifice data control for convenience. --- References 1. W3C Web Speech API Specification. W3C. 2. AssemblyAI. “Speech recognition in the browser using Web Speech API.” 2025. 3. FreeCodeCamp. “How to Build a Voice‑Powered AI Application with the Web Speech API.” 4. PingCAP. “Privacy‑First AI: Building a Voice‑to‑Text App That Learns Style.” 2026. 5. Y Combinator. “Willow Voice - Voice is Your New Keyboard.” 2026. 6. OpenQuobi. “Private, on‑device dictation for desktop.” GitHub. 7. OpenWhispr. “Voice‑to‑text dictation app with local and cloud models.” GitHub. 8. Google Translate Website Widget Documentation. Google Developers.