You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A docker volume should be created called "whisper" can be used for storing the Whisper language
20
-
models. You can see which models are available to download locally [here](https://huggingface.co/ggerganov/whisper.cpp).
37
+
A Docker volume called "whisper" can be used for storing the Whisper language
38
+
models. You can see which models are available to download from the [HuggingFace whisper.cpp repository](https://huggingface.co/ggerganov/whisper.cpp).
21
39
22
40
The following command will run the server on port 8080 for an NVIDIA GPU:
23
41
@@ -26,98 +44,147 @@ docker run \
26
44
--name whisper-server --rm \
27
45
--runtime nvidia --gpus all \ # When using a NVIDIA GPU
28
46
-v whisper:/data -p 8080:80 \
29
-
ghcr.io/mutablelogic/go-whisper:latest
47
+
ghcr.io/mutablelogic/go-whisper:latest-cuda
30
48
```
31
49
32
-
The API is then
33
-
available at `http://localhost:8080/v1` and it generally conforms to the
The API is then available at `http://localhost:8080/api/v1` and it generally conforms to the [OpenAI API](https://platform.openai.com/docs/api-reference/audio) spec.
51
+
52
+
##API Examples
35
53
36
-
### Sample Usage
54
+
The API is available through the server and conforms generally to the OpenAI API spec. Here are some common usage examples:
37
55
38
-
In order to download a model, you can use the following command (for example):
There's more information on the API [here](doc/API.md).
93
+
For more detailed API documentation, see the [API Reference](doc/API.md).
69
94
70
95
## Building
71
96
72
-
If you are building a docker image, you just need make and docker installed:
97
+
### Docker Images
98
+
99
+
If you are building a Docker image, you just need make and Docker installed:
73
100
74
-
*`DOCKER_REGISTRY=docker.io/user make docker` - builds a docker container with the
75
-
server binary for CUDA, tagged to a specific registry
76
-
*`OS=linux GGML_CUDA=0 DOCKER_REGISTRY=docker.io/user make docker` - builds a docker container
77
-
for Linux, with the server binary without CUDA, tagged to a specific registry
101
+
-`GGML_CUDA=1 DOCKER_REGISTRY=docker.io/user make docker` - builds a Docker container with the server binary for CUDA, tagged to a specific registry
102
+
-`OS=linux GGML_CUDA=0 DOCKER_REGISTRY=docker.io/user make docker` - builds a Docker container for Linux, with the server binary without CUDA, tagged to a specific registry
78
103
79
-
If you want to build the server without docker, you can use the `Makefile` in the root
104
+
### From Source
105
+
106
+
If you want to build the server without Docker, you can use the `Makefile` in the root
80
107
directory and have the following dependencies met:
81
108
82
-
* Recent version of Go (ie, 1.22+)
83
-
* C++ compiler and cmake
84
-
* FFmpeg 6.1 libraries (see [here](doc/build.md) for more information)
85
-
* For CUDA, you'll need the CUDA toolkit installed including the `nvcc` compiler
109
+
- Recent version of Go (ie, 1.22+)
110
+
- C++ compiler and cmake
111
+
- For CUDA, you'll need the CUDA toolkit installed including the `nvcc` compiler
86
112
87
113
The following `Makefile` targets can be used:
88
114
89
-
*`make server` - creates the server binary, and places it in the `build` directory. Should
90
-
link to Metal on macOS
91
-
*`GGML_CUDA=1 make server` - creates the server binary linked to CUDA, and places it
92
-
in the `build` directory. Should work for amd64 and arm64 (Jetson) platforms
115
+
-`OS=linux make whisper` - creates the server binary, and places it in the `build` directory. Should link to Metal on macOS
116
+
-`OS=linux GGML_CUDA=1 make whisper` - creates the server binary linked to CUDA, and places it in the `build` directory. Should work for amd64 and arm64 (Jetson) platforms
93
117
94
118
See all the other targets in the `Makefile` for more information.
95
119
96
-
## Developing
120
+
## Command Line Usage
97
121
98
-
TODO
122
+
The `whisper` command-line tool can be built with `make whisper` and provides various functionalities.
99
123
100
-
## Status
124
+
```bash
125
+
# List available models
126
+
whisper models
101
127
102
-
Still in development. See this [issue](https://github.com/mutablelogic/go-whisper/issues/1) for
0 commit comments