ML-powered speech recognition directly in your browser! Built with 🤗 Transformers.js.
Check out the demo site here.
Important:
Experimental WebGPU support has been added to this branch (demo), if you’d like to run with GPU acceleration!
Running locally
- Clone the repo and install dependencies:
git clone https://github.com/xenova/whisper-web.git
cd whisper-web
npm install
- Run the development server:
npm run dev
- Open the link (e.g., http://localhost:5173/) in your browser.
- To access from other IPs, you need edit package.json. Go to block “scripts” and find entry “dev”:”vite”,then add “–host 0.0.0.0” after “vite”
sudo vi package.json
you will get content like this
{
"name": "whisper-web",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"clean": "rm -rf node_modules/ dist/",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint src/**/*.{js,jsx,ts,tsx,json}",
"lint:fix": "eslint --fix src/**/*.{js,jsx,ts,tsx,json}",
"format": "prettier --write src/**/*.{js,jsx,ts,tsx,css,md,json} --config ./.prettierrc",
"tsc": "tsc"
},
......
then go to line 7 and add “–host 0.0.0.0” to allow other IPs to access
{
"name": "whisper-web",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --host 0.0.0.0",
"clean": "rm -rf node_modules/ dist/",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint src/**/*.{js,jsx,ts,tsx,json}",
"lint:fix": "eslint --fix src/**/*.{js,jsx,ts,tsx,json}",
"format": "prettier --write src/**/*.{js,jsx,ts,tsx,css,md,json} --config ./.prettierrc",
"tsc": "tsc"
},
......