### Run Development Server Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Starts the development server for the nodejs-whisper project. ```bash npm run dev ``` -------------------------------- ### Install nodejs-whisper Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Installs the nodejs-whisper package using npm. ```bash npm i nodejs-whisper ``` -------------------------------- ### Install Build Tools Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Installs necessary build tools for the nodejs-whisper package on Debian/Ubuntu-based systems. ```bash sudo apt update sudo apt install build-essential ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Installs all necessary npm dependencies for the nodejs-whisper project. ```bash npm install ``` -------------------------------- ### Basic Transcription Example Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Performs audio transcription using the nodejs-whisper library. Ensure the audio file path and model details are correctly configured. ```javascript import path from 'path' import { nodewhisper } from 'nodejs-whisper' // Need to provide exact path to your audio file. const filePath = path.resolve(__dirname, 'YourAudioFileName') await nodewhisper(filePath, { modelName: 'base.en', //Downloaded models name modelRootPath: '/path/to/whisper/models', // (optional) directory containing the ggml model file autoDownloadModelName: 'base.en', // (optional) auto download a model if model is not present removeWavFileAfterTranscription: false, // (optional) remove wav file once transcribed withCuda: false, // (optional) use cuda for faster processing logger: console, // (optional) Logging instance, defaults to console whisperOptions: { outputInCsv: false, // get output result in csv file outputInJson: false, // get output result in json file outputInJsonFull: false, // get output result in json file including more information outputInLrc: false, // get output result in lrc file outputInSrt: true, // get output result in srt file outputInText: false, // get output result in txt file outputInVtt: false, // get output result in vtt file outputInWords: false, // get output result in wts file for karaoke translateToEnglish: false, // translate from source language to english wordTimestamps: false, // word-level timestamps timestamps_length: 20, // amount of dialogue per timestamp pair splitOnWord: true, // split on word rather than on token noGpu: false, // disable GPU inference }, }) ``` -------------------------------- ### Build Project Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Builds the nodejs-whisper project for production. ```bash npm run build ``` -------------------------------- ### Navigate to Project Directory Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Changes the current directory to the cloned nodejs-whisper project folder. ```bash cd nodejs-whisper ``` -------------------------------- ### Clone Project Repository Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Clones the nodejs-whisper project from its GitHub repository. ```bash git clone https://github.com/ChetanXpro/nodejs-whisper ``` -------------------------------- ### Download Whisper Model Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Downloads the Whisper model using the nodejs-whisper CLI. ```bash npx nodejs-whisper download ``` -------------------------------- ### Transcription with Docker Model Cache Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Performs audio transcription using a specified model, with the model files cached in a Docker volume. ```javascript await nodewhisper(filePath, { modelName: 'tiny.en', autoDownloadModelName: 'tiny.en', modelRootPath: '/data/whisper-models', whisperOptions: { outputInSrt: true, }, }) ``` -------------------------------- ### Custom CMake Flags for Build Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Builds the project with custom CMake arguments, such as disabling native GGML compilation. ```bash NODEJS_WHISPER_CMAKE_ARGS="-DGGML_NATIVE=OFF" npm test ``` -------------------------------- ### Docker Model Cache Configuration Source: https://github.com/chetanxpro/nodejs-whisper/blob/main/README.md Configures Docker volume mounting to cache Whisper models within a containerized environment. ```yaml volumes: - ./.docker-data/whisper-models:/data/whisper-models ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.