mutablelogic / go-whisper

Speech-to-Text in golang
https://pkg.go.dev/github.com/mutablelogic/go-whisper
Apache License 2.0
73 stars 9 forks source link

Update README.md #45

Closed RamiAwar closed 2 months ago

RamiAwar commented 3 months ago

Update model usage docs

djthorpe commented 3 months ago

Thanks for the pull request. I've taken another look here and I was being a bit inconsistent on model-id vs model-path. I may not have completely resolved it, but I intended for the model-id not to include the ".bin" extension (the model path should include that).

I've updated the documentation to reflect it, and added some more documentation here which might clarify things a further. Can you check to make sure the documentation is now reflecting the reality!!!

Thank you.

RamiAwar commented 3 months ago

Hmmm I tried pulling and running make server again but it fails now, I think your last commit needs some more updates to references of newSegment

❯ rm -r build
❯ make server
Mkdir build
Tidy
Generating pkg-config
Checking out submodules
Building libwhisper.a
I ccache not found. Consider installing it for faster compilation.
I whisper.cpp build info:
I UNAME_S:   Darwin
I UNAME_P:   arm
I UNAME_M:   arm64
I CFLAGS:    -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE -DNDEBUG -DGGML_USE_ACCELERATE -DGGML_USE_BLAS -DACCELERATE_NEW_LAPACK -DACCELERATE_LAPACK_ILP64 -DGGML_USE_METAL -DGGML_METAL_EMBED_LIBRARY -I/opt/homebrew/opt/ffmpeg@6/include -std=c11   -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -pthread -Wunreachable-code-break -Wunreachable-code-return -Wdouble-promotion
I CXXFLAGS:  -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -pthread   -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE -DNDEBUG -DGGML_USE_ACCELERATE -DGGML_USE_BLAS -DACCELERATE_NEW_LAPACK -DACCELERATE_LAPACK_ILP64 -DGGML_USE_METAL -DGGML_METAL_EMBED_LIBRARY -I/opt/homebrew/opt/ffmpeg@6/include
I NVCCFLAGS: -std=c++11 -O3
I LDFLAGS:   -framework Accelerate -framework Foundation -framework Metal -framework MetalKit -L/opt/homebrew/opt/ffmpeg@6/lib
I CC:        Apple clang version 15.0.0 (clang-1500.3.9.4)
I CXX:       Apple clang version 15.0.0 (clang-1500.3.9.4)

make[1]: `libwhisper.a' is up to date.
Building libggml.a
I ccache not found. Consider installing it for faster compilation.
I whisper.cpp build info:
I UNAME_S:   Darwin
I UNAME_P:   arm
I UNAME_M:   arm64
I CFLAGS:    -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE -DNDEBUG -DGGML_USE_ACCELERATE -DGGML_USE_BLAS -DACCELERATE_NEW_LAPACK -DACCELERATE_LAPACK_ILP64 -DGGML_USE_METAL -DGGML_METAL_EMBED_LIBRARY -I/opt/homebrew/opt/ffmpeg@6/include -std=c11   -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -pthread -Wunreachable-code-break -Wunreachable-code-return -Wdouble-promotion
I CXXFLAGS:  -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -pthread   -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -Iggml/include -Iggml/src -Iinclude -Isrc -Iexamples -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE -DNDEBUG -DGGML_USE_ACCELERATE -DGGML_USE_BLAS -DACCELERATE_NEW_LAPACK -DACCELERATE_LAPACK_ILP64 -DGGML_USE_METAL -DGGML_METAL_EMBED_LIBRARY -I/opt/homebrew/opt/ffmpeg@6/include
I NVCCFLAGS: -std=c++11 -O3
I LDFLAGS:   -framework Accelerate -framework Foundation -framework Metal -framework MetalKit -L/opt/homebrew/opt/ffmpeg@6/lib
I CC:        Apple clang version 15.0.0 (clang-1500.3.9.4)
I CXX:       Apple clang version 15.0.0 (clang-1500.3.9.4)

make[1]: `libggml.a' is up to date.
Building whisper-server
# github.com/mutablelogic/go-whisper/pkg/whisper/task
pkg/whisper/task/context.go:173:23: not enough arguments in call to newSegment
    have (time.Duration, *whisper.Segment)
    want (time.Duration, int32, *whisper.Segment)
make: *** [server] Error 1
djthorpe commented 3 months ago

Apologies, this was a mistake on my part. Now merged a temp fix into main

djthorpe commented 2 months ago

Closing Pull Request for now; please open another for any other changes!