Skip to content

Commit 12a6859

Browse files
authored
Merge pull request #58 from mutablelogic/v1
Updates for CLI and dockerfile
2 parents 980cce9 + 7568765 commit 12a6859

File tree

22 files changed

+181
-422
lines changed

22 files changed

+181
-422
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ BUILD_DIR := build
1616

1717
# Build flags
1818
BUILD_MODULE := $(shell cat go.mod | head -1 | cut -d ' ' -f 2)
19-
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/whisper/version.GitSource=${BUILD_MODULE}
20-
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/whisper/version.GitTag=$(shell git describe --tags --always)
21-
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/whisper/version.GitBranch=$(shell git name-rev HEAD --name-only --always)
22-
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/whisper/version.GitHash=$(shell git rev-parse HEAD)
23-
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/whisper/version.GoBuildTime=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
19+
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/version.GitSource=${BUILD_MODULE}
20+
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/version.GitTag=$(shell git describe --tags --always)
21+
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/version.GitBranch=$(shell git name-rev HEAD --name-only --always)
22+
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/version.GitHash=$(shell git rev-parse HEAD)
23+
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/version.GoBuildTime=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
2424
BUILD_FLAGS = -ldflags "-s -w $(BUILD_LD_FLAGS)"
2525

2626
# If GGML_CUDA is set, then add a cuda tag for the go ${BUILD FLAGS}

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Speech-to-Text in golang. This is an early development version.
44

5-
* `cmd` contains an OpenAI-API compatible server
5+
* `cmd` contains an OpenAI-API compatible service
66
* `pkg` contains the `whisper` service and client
77
* `sys` contains the `whisper` bindings to the `whisper.cpp` library
88
* `third_party` is a submodule for the whisper.cpp source
@@ -11,6 +11,7 @@ Speech-to-Text in golang. This is an early development version.
1111

1212
(Note: Docker images are not created yet - this is some forward planning!)
1313

14+
You can either run the whisper service as a CLI command or in a docker container.
1415
There are docker images for arm64 and amd64 (Intel). The arm64 image is built for
1516
Jetson GPU support specifically, but it will also run on Raspberry Pi's.
1617

@@ -19,14 +20,15 @@ In order to utilize a NVIDIA GPU, you'll need to install the
1920

2021
A docker volume should be created called "whisper" can be used for storing the Whisper language
2122
models. You can see which models are available to download locally [here](https://huggingface.co/ggerganov/whisper.cpp).
22-
The following command will run the server on port 8080:
23+
24+
The following command will run the server on port 8080 for an NVIDIA GPU:
2325

2426
```bash
2527
docker run \
2628
--name whisper-server --rm \
2729
--runtime nvidia --gpus all \ # When using a NVIDIA GPU
2830
-v whisper:/models -p 8080:8080 -e WHISPER_DATA=/models \
29-
ghcr.io/mutablelogic/go-whisper:latest
31+
ghcr.io/mutablelogic/go-whisper
3032
```
3133

3234
If you include a `-debug` flag at the end, you'll get more verbose output. The API is then
@@ -92,6 +94,11 @@ The following `Makefile` targets can be used:
9294

9395
See all the other targets in the `Makefile` for more information.
9496

97+
## Developing
98+
99+
The `cmd/examples` directory contains a simple example of how to use the `whisper` package
100+
in your own code.
101+
95102
## Status
96103

97104
Still in development. See this [issue](https://github.com/mutablelogic/go-whisper/issues/1) for

cmd/cli/delete.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

cmd/cli/download.go

Lines changed: 0 additions & 34 deletions
This file was deleted.

cmd/cli/main.go

Lines changed: 0 additions & 87 deletions
This file was deleted.

cmd/cli/models.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

cmd/cli/transcribe.go

Lines changed: 0 additions & 42 deletions
This file was deleted.

cmd/cli/translate.go

Lines changed: 0 additions & 42 deletions
This file was deleted.

cmd/server/flags.go

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)