Spaces:
Running
go : run `go mod tidy` before building examples + fix permissions (#296)
Browse files* run `go mod tidy` before building examples
Running `make examples` after cloning the repository gives the following
error:
```
...
[100%] Built target whisper
gmake[3]: Leaving directory '/tmp/exp/whisper.cpp/bindings/go/build'
gmake[2]: Leaving directory '/tmp/exp/whisper.cpp/bindings/go/build'
gmake[1]: Leaving directory '/tmp/exp/whisper.cpp/bindings/go/build'
Build example go-model-download
Build example go-whisper
examples/go-whisper/process.go:11:2: missing go.sum entry for module providing package github.com/go-audio/wav (imported by github.com/ggerganov/whisper.cpp/bindings/go/examples/go-whisper); to add:
go get github.com/ggerganov/whisper.cpp/bindings/go/examples/go-whisper
make: *** [Makefile:26: examples/go-whisper] Error 1
```
* remove executable bit from various files
- bindings/go/.gitignore +0 -0
- bindings/go/LICENSE +0 -0
- bindings/go/Makefile +5 -4
- bindings/go/README.md +0 -0
- bindings/go/examples/go-model-download/context.go +0 -0
- bindings/go/examples/go-model-download/main.go +0 -0
- bindings/go/examples/go-whisper/flags.go +0 -0
- bindings/go/examples/go-whisper/main.go +0 -0
- bindings/go/examples/go-whisper/process.go +0 -0
- bindings/go/go.mod +0 -0
- bindings/go/pkg/whisper/consts.go +0 -0
- bindings/go/pkg/whisper/context.go +0 -0
- bindings/go/pkg/whisper/context_test.go +0 -0
- bindings/go/pkg/whisper/doc.go +0 -0
- bindings/go/pkg/whisper/interface.go +0 -0
- bindings/go/pkg/whisper/model.go +0 -0
- bindings/go/samples/jfk.wav +0 -0
|
File without changes
|
|
File without changes
|
|
@@ -11,8 +11,7 @@ whisper: mkdir
|
|
| 11 |
@${CMAKE} -S ../.. -B ${BUILD_DIR} -D BUILD_SHARED_LIBS=off -D WHISPER_NO_AVX2=on
|
| 12 |
@${CMAKE} --build ${BUILD_DIR} --target whisper
|
| 13 |
|
| 14 |
-
test: model-small whisper
|
| 15 |
-
@go mod tidy
|
| 16 |
@go test -v .
|
| 17 |
@go test -v ./pkg/whisper/...
|
| 18 |
|
|
@@ -21,7 +20,7 @@ examples: $(EXAMPLES_DIR)
|
|
| 21 |
model-small: mkdir examples/go-model-download
|
| 22 |
@${BUILD_DIR}/go-model-download -out models small.en
|
| 23 |
|
| 24 |
-
$(EXAMPLES_DIR): mkdir whisper
|
| 25 |
@echo Build example $(notdir $@)
|
| 26 |
@go build ${BUILD_FLAGS} -o ${BUILD_DIR}/$(notdir $@) ./$@
|
| 27 |
|
|
@@ -31,8 +30,10 @@ mkdir:
|
|
| 31 |
@echo Mkdir ${MODELS_DIR}
|
| 32 |
@install -d ${MODELS_DIR}
|
| 33 |
|
|
|
|
|
|
|
|
|
|
| 34 |
clean:
|
| 35 |
@echo Clean
|
| 36 |
@rm -fr $(BUILD_DIR)
|
| 37 |
-
@go mod tidy
|
| 38 |
@go clean
|
|
|
|
| 11 |
@${CMAKE} -S ../.. -B ${BUILD_DIR} -D BUILD_SHARED_LIBS=off -D WHISPER_NO_AVX2=on
|
| 12 |
@${CMAKE} --build ${BUILD_DIR} --target whisper
|
| 13 |
|
| 14 |
+
test: model-small whisper modtidy
|
|
|
|
| 15 |
@go test -v .
|
| 16 |
@go test -v ./pkg/whisper/...
|
| 17 |
|
|
|
|
| 20 |
model-small: mkdir examples/go-model-download
|
| 21 |
@${BUILD_DIR}/go-model-download -out models small.en
|
| 22 |
|
| 23 |
+
$(EXAMPLES_DIR): mkdir whisper modtidy
|
| 24 |
@echo Build example $(notdir $@)
|
| 25 |
@go build ${BUILD_FLAGS} -o ${BUILD_DIR}/$(notdir $@) ./$@
|
| 26 |
|
|
|
|
| 30 |
@echo Mkdir ${MODELS_DIR}
|
| 31 |
@install -d ${MODELS_DIR}
|
| 32 |
|
| 33 |
+
modtidy:
|
| 34 |
+
@go mod tidy
|
| 35 |
+
|
| 36 |
clean:
|
| 37 |
@echo Clean
|
| 38 |
@rm -fr $(BUILD_DIR)
|
|
|
|
| 39 |
@go clean
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|