Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade whisper.cpp #325

Merged
merged 3 commits into from
Jan 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ ifeq ($(UNAME_S),Darwin)
ifeq (,$(findstring AVX1.0,$(AVX1_M)))
CMAKE_FLAGS += -DWHISPER_NO_AVX=ON
endif
ifeq (,$(findstring FMA,$(AVX1_M)))
CMAKE_FLAGS += -DWHISPER_NO_FMA=ON
endif
AVX2_M := $(shell sysctl machdep.cpu.leaf7_features)
ifeq (,$(findstring AVX2,$(AVX2_M)))
CMAKE_FLAGS += -DWHISPER_NO_AVX2=ON
Expand Down
2 changes: 1 addition & 1 deletion buzz/transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def whisper_cpp_params(

class WhisperCpp:
def __init__(self, model: str) -> None:
self.ctx = whisper_cpp.whisper_init(model.encode('utf-8'))
self.ctx = whisper_cpp.whisper_init_from_file(model.encode('utf-8'))

def transcribe(self, audio: Union[np.ndarray, str], params: Any):
if isinstance(audio, str):
Expand Down
2 changes: 1 addition & 1 deletion whisper.cpp
Submodule whisper.cpp updated 59 files
+17 −0 .github/workflows/bindings.yml
+30 −0 .github/workflows/build.yml
+15 −8 CMakeLists.txt
+27 −2 Makefile
+1 −0 README.md
+0 −1 bindings/go/.gitignore
+9 −10 bindings/go/Makefile
+23 −0 bindings/go/README.md
+8 −6 bindings/go/examples/go-model-download/main.go
+22 −0 bindings/go/examples/go-whisper/color.go
+96 −1 bindings/go/examples/go-whisper/flags.go
+1 −2 bindings/go/examples/go-whisper/main.go
+66 −19 bindings/go/examples/go-whisper/process.go
+23 −0 bindings/go/go.sum
+25 −3 bindings/go/params.go
+5 −4 bindings/go/pkg/whisper/consts.go
+107 −1 bindings/go/pkg/whisper/context.go
+23 −1 bindings/go/pkg/whisper/interface.go
+7 −2 bindings/go/pkg/whisper/model.go
+10 −3 bindings/go/whisper.go
+4 −1 bindings/go/whisper_test.go
+1 −1 bindings/ios
+1 −1 bindings/javascript/emscripten.cpp
+1 −1 bindings/javascript/whisper.js
+17 −0 cmake/DefaultTargetOptions.cmake
+2 −0 examples/bench.wasm/CMakeLists.txt
+1 −1 examples/bench.wasm/emscripten.cpp
+3 −0 examples/bench/CMakeLists.txt
+1 −1 examples/bench/bench.cpp
+2 −0 examples/command.wasm/CMakeLists.txt
+1 −1 examples/command.wasm/emscripten.cpp
+3 −0 examples/command/CMakeLists.txt
+13 −2 examples/command/README.md
+365 −245 examples/command/command.cpp
+3 −0 examples/main/CMakeLists.txt
+91 −64 examples/main/main.cpp
+2 −0 examples/stream.wasm/CMakeLists.txt
+1 −1 examples/stream.wasm/emscripten.cpp
+3 −0 examples/stream/CMakeLists.txt
+8 −5 examples/stream/stream.cpp
+4 −2 examples/talk.wasm/CMakeLists.txt
+1 −1 examples/talk.wasm/README.md
+1 −1 examples/talk.wasm/emscripten.cpp
+3 −0 examples/talk/CMakeLists.txt
+1 −1 examples/talk/talk.cpp
+10 −4 examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreenViewModel.kt
+12 −1 examples/whisper.android/app/src/main/java/com/whispercppdemo/whisper/LibWhisper.kt
+75 −1 examples/whisper.android/app/src/main/jni/whisper/jni.c
+0 −10 examples/whisper.android/local.properties
+1 −1 examples/whisper.objc/whisper.objc/ViewController.m
+1 −1 examples/whisper.swiftui/whisper.cpp.swift/LibWhisper.swift
+2 −0 examples/whisper.wasm/CMakeLists.txt
+1 −1 examples/whisper.wasm/emscripten.cpp
+1,013 −1,044 ggml.c
+3 −0 ggml.h
+1 −1 models/convert-h5-to-ggml.py
+1 −1 models/download-ggml-model.cmd
+172 −83 whisper.cpp
+18 −5 whisper.h