Skip to content

Commit d18b67d

Browse files
authored
Update README.md (#56)
1 parent 2a98263 commit d18b67d

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

examples/whisper/README.md

+28-11
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,41 @@
22

33
[Whisper](https://github.com/openai/whisper) is a speech-to-text model from OpenAI. It ordinarily requires 30s of input data for transcription, making it challenging to use in real-time applications. We work around this by limitation by padding shorter bursts of speech with silent audio packets.
44

5-
## Run the demo
5+
## How to run the demo
66

7-
Change the URL and TOKEN inside the script
7+
### Step 1:
8+
Change the URL and TOKEN inside the whisper.py script to use your LiveKit websocket URL and a valid session token
89

9-
Clone whisper.cpp inside this directory
10-
11-
### Build a shared lib:
10+
### Step 2:
11+
Clone [whisper.cpp](https://github.com/ggerganov/whisper.cpp) inside this directory
1212

13+
### Step 3:
14+
Build a shared library:
1315
```
16+
cd whisper.cpp
1417
gcc -O3 -std=c11 -pthread -mavx -mavx2 -mfma -mf16c -fPIC -c ggml.c
1518
g++ -O3 -std=c++11 -pthread --shared -fPIC -static-libstdc++ whisper.cpp ggml.o -o libwhisper.so
1619
```
1720

18-
### Download a model you want to use:
19-
./download-ggml-model.sh tiny.en
21+
### Step 4:
22+
Download a model you want to use, for example:
23+
```
24+
./models/download-ggml-model.sh tiny.en
25+
```
26+
27+
### Step 5:
28+
Rename the shared object library if you're on Windows or macOS:
29+
1. If Windows, rename `libwhisper.so` to `libwhisper.dll`
30+
2. If macOS, rename `libwhisper.so` to `libwhisper.dylib`
2031

21-
### Run whisper.py
22-
Run the script and connect another participant with a microphone:
32+
### Step 6:
33+
Run the whisper.py script:
34+
```
35+
python3 whisper.py
36+
```
2337

24-
You can use our Meet example or use the livekit-cli:
25-
e.g: `livekit-cli load-test --room yourroom --audio-publishers 1`
38+
### Step 7:
39+
Connect another participant to the room and publish a microphone stream. To do this quickly, you can use our [Meet example](https://meet.livekit.io/?tab=custom) or use the [livekit-cli](https://github.com/livekit/livekit-cli):
40+
```
41+
livekit-cli load-test --room yourroom --audio-publishers 1
42+
```

0 commit comments

Comments
 (0)