forked from ggerganov/whisper.cpp
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
* origin/master: bench.py : add different large models (ggerganov#1655) wchess : update README.md release : v1.5.2 wchess : update readme wchess : whisper assisted chess (ggerganov#1595) sync : ggml (Metal fixes, new ops, tests) (ggerganov#1633) cmake : target windows 8 or above for prefetchVirtualMemory in llama-talk (ggerganov#1617) cmake : Fix bug in httplib.h for mingw (ggerganov#1615) metal : fix `ggml_metal_log` vargs (ggerganov#1606) whisper.objc : disable timestamps for real-time transcription whisper : more debug messages + fix fallback logic metal : fix soft_max kernel src1 argument (ggerganov#1602) sync : ggml (new ops, new backend, etc) (ggerganov#1602) server : pass max-len argument to the server (ggerganov#1574) ios : Remove `#if arch(arm)` check for using Metal (ggerganov#1561) ggml : Fix 32-bit compiler warning (ggerganov#1575) ggml : re-enable blas for src0 != F32 (ggerganov#1583)
- Loading branch information
Showing
64 changed files
with
11,178 additions
and
1,596 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ios
updated
15 files
+1 −1 | Makefile | |
+43 −8 | Sources/whisper/ggml-alloc.c | |
+8 −1 | Sources/whisper/ggml-alloc.h | |
+46 −21 | Sources/whisper/ggml-backend-impl.h | |
+563 −156 | Sources/whisper/ggml-backend.c | |
+62 −17 | Sources/whisper/ggml-backend.h | |
+1 −1 | Sources/whisper/ggml-impl.h | |
+4 −5 | Sources/whisper/ggml-metal.h | |
+1,028 −197 | Sources/whisper/ggml-metal.m | |
+2,323 −344 | Sources/whisper/ggml-metal.metal | |
+3 −3 | Sources/whisper/ggml-quants.c | |
+724 −215 | Sources/whisper/ggml.c | |
+79 −12 | Sources/whisper/include/ggml.h | |
+2 −2 | Sources/whisper/include/whisper.h | |
+39 −65 | Sources/whisper/whisper.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,3 +187,5 @@ else() | |
#add_subdirectory(talk-llama) | ||
#add_subdirectory(lsp) | ||
endif() | ||
|
||
add_subdirectory(wchess) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
add_subdirectory(libwchess) | ||
|
||
if (EMSCRIPTEN) | ||
add_subdirectory(wchess.wasm) | ||
else() | ||
add_subdirectory(wchess.cmd) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# wchess | ||
|
||
Voice-controlled chess using Whisper | ||
|
||
Online demo: https://whisper.ggerganov.com/wchess/ | ||
|
||
https://github.com/ggerganov/whisper.cpp/assets/1991296/c2b2f03c-9684-49f3-8106-357d2d4e67fa | ||
|
||
## Command-line tool | ||
|
||
```bash | ||
mkdir build && cd build | ||
cmake -DWHISPER_SDL2=1 .. | ||
make -j | ||
|
||
./bin/wchess -m ../models/ggml-base.en.bin | ||
|
||
Move: start | ||
|
||
a b c d e f g h | ||
r n b q k b n r 8 | ||
p p p p p p p p 7 | ||
. * . * . * . * 6 | ||
* . * . * . * . 5 | ||
. * . * . * . * 4 | ||
* . * . * . * . 3 | ||
P P P P P P P P 2 | ||
R N B Q K B N R 1 | ||
|
||
White's turn | ||
[(l)isten/(p)ause/(q)uit]: | ||
``` | ||
## TODO | ||
- Fix bugs in the chess moves logic | ||
- Improve web-browser audio capture - sometimes it does not record the voice properly | ||
- Add support for more languages by making the generated grammar string multilingual | ||
- Explore ways to improve the dynamic grammar to be narrower | ||
PRs welcome! | ||
## Thanks | ||
- [chessboardjs](https://chessboardjs.com) for the neat chessboard JS library used in this demo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
add_library(wchess-core STATIC | ||
WChess.cpp | ||
WChess.h | ||
Chessboard.cpp | ||
Chessboard.h | ||
) | ||
|
||
target_link_libraries(wchess-core | ||
PUBLIC | ||
whisper | ||
common | ||
) | ||
|
||
target_include_directories(wchess-core | ||
PUBLIC | ||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" | ||
) | ||
|
||
# add_executable(test-chessboard test-chessboard.cpp Chessboard.cpp) |
Oops, something went wrong.