The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
| # This script will transcribe an audio file (mp3, wav, etc.) to text and then clean the text using a local LLM model via Ollama. Technically, this script will work with any LLM that supports the standard OpenAI bindings with minor adjustments. | |
| # GETTING STARTED: | |
| # 1. Install required python packages (pip install openai python-dotenv) | |
| # 2. Git clone a copy of ggerganov/whisper (https://github.com/ggerganov/whisper.cpp) | |
| # 3. Build the whisper binary (see the whisper.cpp README for instructions) | |
| # 4. Download one of the whisper models (largev2 is the most accurate for all languages, though the base model works reasonably well for English). | |
| # 5. Install ffmpeg (brew install ffmpeg on macOS, apt-get install ffmpeg) | |
| # 6. Install ollama (https://ollama.com/download) | |
| # 7. Download an LLM model (https://ollama.com/library) |
| ## Pre-requisite: You have to know your last commit message from your deleted branch. | |
| git reflog | |
| # Search for message in the list | |
| # a901eda HEAD@{18}: commit: <last commit message> | |
| # Now you have two options, either checkout revision or HEAD | |
| git checkout a901eda | |
| # Or | |
| git checkout HEAD@{18} |
| // Core assets | |
| let coreAssets = []; | |
| // On install, cache core assets | |
| self.addEventListener('install', function (event) { | |
| // Cache core assets | |
| event.waitUntil(caches.open(coreID).then(function (cache) { | |
| for (let asset of coreAssets) { | |
| cache.add(new Request(asset)); |
| /** | |
| * The pseudo-element 'content' property doesnt accept normal (») style | |
| * HTML entities. These variables below easy the pain of looking up the HEX codes... | |
| * | |
| * Referenced from http://www.danshort.com/HTMLentities/ | |
| * | |
| * TODO: Add all the other entities? Worth it? Some day? Maybe? | |
| */ | |
| // Punctuation |
| <?php | |
| require 'path-to-Stripe.php'; | |
| if ($_POST) { | |
| Stripe::setApiKey("YOUR-API-KEY"); | |
| $error = ''; | |
| $success = ''; | |
| try { | |
| if (!isset($_POST['stripeToken'])) | |
| throw new Exception("The Stripe Token was not generated correctly"); |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, | |
| b, u, i, center, | |
| dl, dt, dd, ol, ul, li, | |
| fieldset, form, label, legend, | |
| table, caption, tbody, tfoot, thead, tr, th, td, | |
| article, aside, canvas, details, embed, |