Skip to content

Commit 66a3cf2

Browse files
committed
Initial commit
0 parents  commit 66a3cf2

33 files changed

+7568
-0
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.eslintrc

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"es2021": true
6+
},
7+
"parser": "@typescript-eslint/parser",
8+
"extends": [
9+
"eslint:recommended",
10+
"plugin:react/recommended",
11+
"plugin:@typescript-eslint/recommended",
12+
"plugin:@typescript-eslint/eslint-recommended",
13+
"prettier"
14+
],
15+
"overrides": [],
16+
"parserOptions": {
17+
"ecmaFeatures": {
18+
"jsx": true
19+
},
20+
"ecmaVersion": "latest",
21+
"sourceType": "module"
22+
},
23+
"plugins": [
24+
"react",
25+
"react-hooks",
26+
"@typescript-eslint",
27+
"prettier"
28+
],
29+
"rules": {
30+
"react/react-in-jsx-scope": "off",
31+
"camelcase": "error",
32+
"spaced-comment": "error",
33+
"no-duplicate-imports": "error",
34+
"prettier/prettier": "error"
35+
},
36+
"settings": {
37+
"react": {
38+
"version": "detect"
39+
}
40+
},
41+
"prettier/prettier": [
42+
"error",
43+
{
44+
"endOfLine": "auto"
45+
}
46+
]
47+
}

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 4,
4+
"printWidth": 80,
5+
"singleQuote": false,
6+
"trailingComma": "all",
7+
"jsxSingleQuote": true,
8+
"bracketSpacing": true,
9+
"endOfLine": "auto"
10+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Xenova
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Transcribe
2+
3+
Use Whisper speech-to-text models directly in your browser. Built with [Transformers.js](https://github.com/xenova/transformers.js), based on the [Whisper Web](https://github.com/xenova/whisper-web/) demo.
4+
5+
## Usage
6+
7+
1. Clone the repo and install dependencies:
8+
9+
```bash
10+
git clone https://github.com/xenova/whisper-web.git
11+
cd whisper-web
12+
npm install
13+
```
14+
15+
2. Run the development server:
16+
17+
```bash
18+
npm run dev
19+
```
20+
21+
> Firefox users need to change the `dom.workers.modules.enabled` setting in `about:config` to `true` to enable Web Workers.
22+
> Check out [this issue](https://github.com/xenova/whisper-web/issues/8) for more details.
23+
24+
3. Open the link (e.g., [http://localhost:5173/](http://localhost:5173/)) in your browser.

index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/transcribe.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Transcribe</title>
8+
<description
9+
>Use Whisper speech-to-text models directly in your browser
10+
</description>
11+
</head>
12+
<body>
13+
<div id="root"></div>
14+
<script type="module" src="/src/index.tsx"></script>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)