]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/log
pkg/ggml/sources/whisper.cpp
18 months agoscripts : do not sync commits from this repo
Georgi Gerganov [Fri, 29 Dec 2023 13:00:46 +0000 (15:00 +0200)]
scripts : do not sync commits from this repo

18 months agoci : build with CLBlast + ggml-opencl use GGML_API (#1576)
Tamotsu Takahashi [Fri, 29 Dec 2023 10:23:27 +0000 (19:23 +0900)]
ci : build with CLBlast + ggml-opencl use GGML_API (#1576)

* Build with CLBlast

* Declare GGML_API

After rebasing, examples/talk-llama failed:

"D:\a\whisper.cpp\whisper.cpp\build\ALL_BUILD.vcxproj" (build target) (1) ->
"D:\a\whisper.cpp\whisper.cpp\build\examples\talk-llama\talk-llama.vcxproj" (default target) (14) ->
(Link target) ->
  llama.obj : error LNK2019: unresolved external symbol ggml_cl_free_data referenced in function "public: __cdecl llama_model::~llama_model(void)" (??1llama_model@@QEAA@XZ) [D:\a\whisper.cpp\whisper.cpp\build\examples\talk-llama\talk-llama.vcxproj]
  llama.obj : error LNK2019: unresolved external symbol ggml_cl_transform_tensor referenced in function "public: void __cdecl llama_model_loader::load_all_data(struct ggml_context *,void (__cdecl*)(float,void *),void *,struct llama_mlock *)" (?load_all_data@llama_model_loader@@QEAAXPEAUggml_context@@P6AXMPEAX@Z1PEAUllama_mlock@@@Z) [D:\a\whisper.cpp\whisper.cpp\build\examples\talk-llama\talk-llama.vcxproj]
  D:\a\whisper.cpp\whisper.cpp\build\bin\Release\talk-llama.exe : fatal error LNK1120: 2 unresolved externals [D:\a\whisper.cpp\whisper.cpp\build\examples\talk-llama\talk-llama.vcxproj]

18 months agowhisper : replace `tensor->n_dims` with `ggml_n_dims(tensor)` (#1694)
bobqianic [Fri, 29 Dec 2023 09:38:35 +0000 (09:38 +0000)]
whisper : replace `tensor->n_dims` with `ggml_n_dims(tensor)` (#1694)

18 months agosync : ggml (VMM, sync-ggml-am, dotprod ARM fixes, CUDA fixes) (#1691)
Georgi Gerganov [Fri, 29 Dec 2023 09:30:47 +0000 (11:30 +0200)]
sync : ggml (VMM, sync-ggml-am, dotprod ARM fixes, CUDA fixes) (#1691)

* scripts : add sync-ggml-am.sh

* sync : ggml (VMM, ARM dot prod fix, etc.)

* build : fix CUDA build

* ggml : fix some mul mat cases + add tests for src1 F16

https://github.com/ggerganov/ggml/commit/dbd02958fa4f46898f68ca29c27ddcdc58a06f98

18 months agodownload : fix large q5 model name (#1695)
Dimo [Fri, 29 Dec 2023 09:14:32 +0000 (10:14 +0100)]
download : fix large q5 model name (#1695)

fixed typo in large-v3-q5-0 model name to match HF link

18 months agowhisper : Replace WHISPER_PRINT_DEBUG with WHISPER_LOG_DEBUG (#1681)
bobqianic [Sat, 23 Dec 2023 12:02:58 +0000 (12:02 +0000)]
whisper : Replace WHISPER_PRINT_DEBUG with WHISPER_LOG_DEBUG (#1681)

18 months agosync : ggml (ggml_scale, ggml_row_size, etc.) (#1677)
Georgi Gerganov [Fri, 22 Dec 2023 15:53:39 +0000 (17:53 +0200)]
sync : ggml (ggml_scale, ggml_row_size, etc.) (#1677)

* sync : ggml

* sync : llama.cpp

* talk-llama : fix obsolete param

* ggml-alloc : fix ggml_tallocr_is_own

* talk.wasm : update to new ggml

* ggml : fix type punning in ggml_scale

* ggml : cuda jetson + arm quants warnings

18 months agodocker : Dockerize whisper.cpp (#1674)
Chaoqun [Fri, 22 Dec 2023 11:16:02 +0000 (19:16 +0800)]
docker :  Dockerize whisper.cpp (#1674)

* build: add dockerfile for ci

* ci: add action to build/push docker image

* fix: lowercase repository to fix ci

* ci: update cuBLAS flag

* build: install curl and ffmped in image

* docs: add docker section

* fix: improve args check when download model

18 months agoCI : Add coverage for talk-llama when WHISPER_CUBLAS=1 (#1672)
bobqianic [Thu, 21 Dec 2023 22:39:46 +0000 (22:39 +0000)]
CI : Add coverage for talk-llama when WHISPER_CUBLAS=1 (#1672)

18 months agoexamples : Revert CMakeLists.txt for talk-llama (#1669)
bobqianic [Thu, 21 Dec 2023 20:48:52 +0000 (20:48 +0000)]
examples : Revert CMakeLists.txt for talk-llama (#1669)

18 months agocmake : set default CUDA architectures (#1667)
bobqianic [Thu, 21 Dec 2023 13:44:04 +0000 (13:44 +0000)]
cmake : set default CUDA architectures (#1667)

18 months agobench.py : add different large models (#1655)
Alfredo Montesinos [Tue, 19 Dec 2023 10:40:14 +0000 (04:40 -0600)]
bench.py : add different large models (#1655)

Amend different large v1,v2,v3 models to benchmark.

18 months agowchess : update README.md
Georgi Gerganov [Thu, 14 Dec 2023 20:00:47 +0000 (22:00 +0200)]
wchess : update README.md

18 months agorelease : v1.5.2
Georgi Gerganov [Thu, 14 Dec 2023 15:56:11 +0000 (17:56 +0200)]
release : v1.5.2

18 months agowchess : update readme
Georgi Gerganov [Thu, 14 Dec 2023 15:51:14 +0000 (17:51 +0200)]
wchess : update readme

18 months agowchess : whisper assisted chess (#1595)
fraxy-v [Thu, 14 Dec 2023 13:58:26 +0000 (15:58 +0200)]
wchess : whisper assisted chess (#1595)

* wchess: whisper assisted chess

* wchess: fix allowed moves in check

* wchess: touchstart, touchend events

* wchess: css, disabled button

* wchess : html touches

* wchess : minor fixes and code style

* wchess : bump encoder context to 1280

* wchess : index.html

* wchess : fix CI warnings

* wchess : add array header

* wchess : build static library

* wchess : display grammar

* wchess : update UX

* wchess : add comment

* wchess : add README

---------

Co-authored-by: Georgi Gerganov <redacted>
18 months agosync : ggml (Metal fixes, new ops, tests) (#1633)
Georgi Gerganov [Wed, 13 Dec 2023 19:55:03 +0000 (21:55 +0200)]
sync : ggml (Metal fixes, new ops, tests) (#1633)

* sync : ggml (Metal fixes, new ops, tests)

* cuda : fix bin bcast when src1 and dst have different types

18 months agocmake : target windows 8 or above for prefetchVirtualMemory in llama-talk (#1617)
Kreijstal [Tue, 12 Dec 2023 11:35:00 +0000 (12:35 +0100)]
cmake : target windows 8 or above for prefetchVirtualMemory in llama-talk (#1617)

Since we use prefetchVirtualMemory we specify we target win 8 or above, otherwise other compilers will refuse to use the prefetchVirtualMemory api, (I understand you are loading it dynamically but the header definition has this limitation)

18 months agocmake : Fix bug in httplib.h for mingw (#1615)
Kreijstal [Sun, 10 Dec 2023 17:47:52 +0000 (18:47 +0100)]
cmake : Fix bug in httplib.h for mingw (#1615)

Fix bug in httlib.h for mingw, please see https://github.com/yhirose/cpp-httplib/issues/1669

18 months agometal : fix `ggml_metal_log` vargs (#1606)
Finn Voorhees [Fri, 8 Dec 2023 11:50:50 +0000 (11:50 +0000)]
metal : fix `ggml_metal_log` vargs (#1606)

18 months agowhisper.objc : disable timestamps for real-time transcription
Georgi Gerganov [Fri, 8 Dec 2023 11:43:37 +0000 (13:43 +0200)]
whisper.objc : disable timestamps for real-time transcription

18 months agowhisper : more debug messages + fix fallback logic
Georgi Gerganov [Fri, 8 Dec 2023 11:43:03 +0000 (13:43 +0200)]
whisper : more debug messages + fix fallback logic

18 months agometal : fix soft_max kernel src1 argument (#1602)
Georgi Gerganov [Fri, 8 Dec 2023 11:39:32 +0000 (13:39 +0200)]
metal : fix soft_max kernel src1 argument (#1602)

18 months agosync : ggml (new ops, new backend, etc) (#1602)
Georgi Gerganov [Thu, 7 Dec 2023 20:27:19 +0000 (22:27 +0200)]
sync : ggml (new ops, new backend, etc) (#1602)

* sync : ggml (new ops, new backend, etc)

* whisper : remove obsolete broadcasting code

* ggml : remove backend self-registers + fix ggml_concat + n_task logic

* metal : fix assert

* metal : print resource path

* whisper : fix bug if metal init fails

18 months agoserver : pass max-len argument to the server (#1574)
Oleg Sidorov [Tue, 5 Dec 2023 21:01:45 +0000 (22:01 +0100)]
server : pass max-len argument to the server (#1574)

This commit fixes the missing parameter binding for max-len between the input
arguments and wparams.

18 months agoios : Remove `#if arch(arm)` check for using Metal (#1561)
Finn Voorhees [Tue, 5 Dec 2023 01:14:26 +0000 (01:14 +0000)]
ios : Remove `#if arch(arm)` check for using Metal (#1561)

18 months agoggml : Fix 32-bit compiler warning (#1575)
Digipom [Sun, 3 Dec 2023 14:15:28 +0000 (09:15 -0500)]
ggml : Fix 32-bit compiler warning (#1575)

Warning about %lu on 32-bit targets. Updated to %zu.

18 months agoggml : re-enable blas for src0 != F32 (#1583)
Georgi Gerganov [Fri, 1 Dec 2023 21:57:52 +0000 (23:57 +0200)]
ggml : re-enable blas for src0 != F32 (#1583)

18 months agoServer : Add support for .vtt format to Whisper server (#1578)
Aleksander Andrzejewski [Thu, 30 Nov 2023 23:44:26 +0000 (00:44 +0100)]
Server : Add support for .vtt format to Whisper server (#1578)

- The code comes from examples/main
- The output mimetype is set to text/vtt

Example usage:
```shell
curl 127.0.0.1:8080/inference \
-H "Content-Type: multipart/form-data" \
-F file="@samples/jfk.wav" \
-F temperature="0.2" \
-F response-format="vtt"
```

19 months agoserver : backport .srt output format (#1565)
Oleg Sidorov [Tue, 28 Nov 2023 13:42:58 +0000 (14:42 +0100)]
server : backport .srt output format (#1565)

This commit adds a support of .srt format to Whisper server. The code is
effectively backported from examples/main. The output mimetype is set to
application/x-subrip as per https://en.wikipedia.org/wiki/SubRip.

Example usage:

  curl 127.0.0.1:8080/inference \
    -H "Content-Type: multipart/form-data" \
    -F file="@<file-path>" \
    -F temperature="0.2" \
    -F response-format="srt"

19 months agocmake : install required ggml.h header (#1568)
Gregor Jasny [Tue, 28 Nov 2023 13:41:49 +0000 (14:41 +0100)]
cmake : install required ggml.h header (#1568)

19 months agoserver : set default CORS headers to allow all (#1567)
Kasumi [Tue, 28 Nov 2023 09:55:20 +0000 (17:55 +0800)]
server : set default CORS headers to allow all (#1567)

19 months agoreadme : update help (#1560)
Hang [Mon, 27 Nov 2023 10:04:08 +0000 (18:04 +0800)]
readme : update help (#1560)

19 months agoCI : Add CUDA 11.8.0 support (#1554)
bobqianic [Mon, 27 Nov 2023 10:03:16 +0000 (10:03 +0000)]
CI : Add CUDA 11.8.0 support (#1554)

* try to fix cublas build in CI

* add multiple cuda-toolkit version

* Update build.yml

* Disable CUDA-toolkit 10.2.89

19 months agoCI : Rectify the Clang-Related workflow issues (#1551)
bobqianic [Mon, 27 Nov 2023 09:35:37 +0000 (09:35 +0000)]
CI : Rectify the Clang-Related workflow issues (#1551)

* fix bugs in workflow

* fix missing clang in workflow

* Update build.yml

19 months agoserver : automatically convert audio on the server (#1539)
Ismatulla Mansurov [Mon, 27 Nov 2023 09:28:34 +0000 (02:28 -0700)]
server : automatically convert audio on the server (#1539)

* server : automatically convert audio on the server

* server : remove rebundant comments

* server : automatic conversion refactor

* server : update server readme

* server : remove unnecessary comments and tabs

* server : put back remove calling

* server : apply suggestions from code review

Co-authored-by: Georgi Gerganov <redacted>
* server : check ffmpeg before the server lunch

* server : fix indentation

* Apply suggestions from code review

Co-authored-by: Georgi Gerganov <redacted>
* server : fix function typo calling

* server : fix function typo calling

* server : add warning in readme

---------

Co-authored-by: Georgi Gerganov <redacted>
19 months agowhisper : remove trailing whitespaces
Georgi Gerganov [Fri, 24 Nov 2023 11:13:12 +0000 (13:13 +0200)]
whisper : remove trailing whitespaces

19 months agorelease : v1.5.1
Georgi Gerganov [Fri, 24 Nov 2023 10:41:55 +0000 (12:41 +0200)]
release : v1.5.1

19 months agometal : add backend function to check device family support (#1547)
Georgi Gerganov [Fri, 24 Nov 2023 10:37:08 +0000 (12:37 +0200)]
metal : add backend function to check device family support (#1547)

19 months agocuda : sync some minor stuff from llama.cpp (#1548)
Georgi Gerganov [Fri, 24 Nov 2023 10:36:21 +0000 (12:36 +0200)]
cuda : sync some minor stuff from llama.cpp (#1548)

19 months agowhisper : fix typo
Georgi Gerganov [Fri, 24 Nov 2023 07:45:10 +0000 (09:45 +0200)]
whisper : fix typo

19 months agoserver : add --print-realtime param (#1541)
ecneladis [Fri, 24 Nov 2023 07:35:02 +0000 (08:35 +0100)]
server : add --print-realtime param (#1541)

* server : add --print-realtime param

* Fix duplicate realtime output

19 months agowhisper : add whisper_lang_str_full (#1546)
bradmit [Fri, 24 Nov 2023 07:33:13 +0000 (18:33 +1100)]
whisper : add whisper_lang_str_full (#1546)

* Update whisper.h

add whisper_lang_fullstr to retrieve the full language name

* Update whisper.cpp

add whisper_lang_fullstr to return the full language name

* fullstr -> str_full

---------

Co-authored-by: Georgi Gerganov <redacted>
19 months agofix(server): typo in temperature parameter (#1545)
Okabintaro [Thu, 23 Nov 2023 18:59:36 +0000 (19:59 +0100)]
fix(server): typo in temperature parameter (#1545)

Also fixed another typo in comments.

19 months agometal : fix build (#1544)
sandrohanea [Thu, 23 Nov 2023 18:20:53 +0000 (19:20 +0100)]
metal : fix build (#1544)

19 months agoreadme : add server example
Georgi Gerganov [Thu, 23 Nov 2023 15:20:33 +0000 (17:20 +0200)]
readme : add server example

19 months agogo : fixed Makefile for MacOS ARM 64 (#1530)
Gleicon Moraes [Wed, 22 Nov 2023 16:08:11 +0000 (13:08 -0300)]
go : fixed Makefile for MacOS ARM 64 (#1530)

* Fixed Makefile for MacOS ARM 64 based on https://github.com/ggerganov/whisper.cpp/issues/1344 + proper ggml-metal env var setting

* conditional to fix broken non-macos compilation

* spaces -> tab

* make : fix whitespaces

---------

Co-authored-by: Georgi Gerganov <redacted>
19 months agoChange temp file name for server application (#1535)
Felix [Wed, 22 Nov 2023 08:23:36 +0000 (09:23 +0100)]
Change temp file name for server application (#1535)

Avoid issue of removing file if it exists in the current working
directory

19 months agobench : pass memcpy threads from cli
Georgi Gerganov [Tue, 21 Nov 2023 20:27:22 +0000 (22:27 +0200)]
bench : pass memcpy threads from cli

19 months agobench : multi-thread memcpy (#1534)
Georgi Gerganov [Tue, 21 Nov 2023 20:07:30 +0000 (22:07 +0200)]
bench : multi-thread memcpy (#1534)

19 months agoClose file after writing in server application (#1533)
Felix [Tue, 21 Nov 2023 19:36:10 +0000 (20:36 +0100)]
Close file after writing in server application (#1533)

Fix of mistake leaving file open while reading it again as wav

19 months agoserver : add video to readme
Georgi Gerganov [Tue, 21 Nov 2023 15:30:43 +0000 (17:30 +0200)]
server : add video to readme

19 months agoserver : add a REST Whisper server example with OAI-like API (#1380)
Felix [Mon, 20 Nov 2023 19:40:24 +0000 (20:40 +0100)]
server : add a REST Whisper server example with OAI-like API (#1380)

* Add first draft of server

* Added json support and base funcs for server.cpp

* Add more user input via api-request

also some clean up

* Add reqest params and load post function

Also some general clean up

* Remove unused function

* Add readme

* Add exception handlers

* Update examples/server/server.cpp

* make : add server target

* Add magic curl syntax

Co-authored-by: Georgi Gerganov <redacted>
---------

Co-authored-by: Georgi Gerganov <redacted>
19 months agowhisper : update example in whisper.h (#1529)
M. A. Ali [Mon, 20 Nov 2023 18:52:27 +0000 (20:52 +0200)]
whisper : update example in whisper.h (#1529)

update the example in the header, previous examples deprecated.

19 months agosdl : fix audio callback (#1523)
Georgi Gerganov [Mon, 20 Nov 2023 11:16:38 +0000 (13:16 +0200)]
sdl : fix audio callback (#1523)

19 months agowhisper : reuse whisper_decode_with_state (#1521)
Georgi Gerganov [Mon, 20 Nov 2023 11:16:11 +0000 (13:16 +0200)]
whisper : reuse whisper_decode_with_state (#1521)

19 months agoci : redistribute CUDA DLLs (#1522)
Tamotsu Takahashi [Sun, 19 Nov 2023 10:43:22 +0000 (19:43 +0900)]
ci : redistribute CUDA DLLs (#1522)

see https://docs.nvidia.com/cuda/eula/index.html#attachment-a

19 months agowhisper : fix with_state methods to use the correct state (#1519)
sandrohanea [Sun, 19 Nov 2023 09:25:30 +0000 (10:25 +0100)]
whisper : fix with_state methods to use the correct state (#1519)

Co-authored-by: Sandro Hanea <redacted>
19 months agowhisper : fix overriding the audio context
Georgi Gerganov [Sun, 19 Nov 2023 08:32:32 +0000 (10:32 +0200)]
whisper : fix overriding the audio context

19 months agocuda : assert ggml_add sources to be contiguous
Georgi Gerganov [Sun, 19 Nov 2023 08:32:08 +0000 (10:32 +0200)]
cuda : assert ggml_add sources to be contiguous

19 months agoios : sync submodule
Georgi Gerganov [Fri, 17 Nov 2023 08:42:04 +0000 (10:42 +0200)]
ios : sync submodule

19 months agosync : ggml (ggml-alloc + linker + gguf fixes) (#1501)
Georgi Gerganov [Fri, 17 Nov 2023 08:00:07 +0000 (10:00 +0200)]
sync : ggml (ggml-alloc + linker + gguf fixes) (#1501)

19 months agoquantize : add support for K-quant types
Georgi Gerganov [Thu, 16 Nov 2023 14:18:24 +0000 (16:18 +0200)]
quantize : add support for K-quant types

19 months agobench : fix memcpy bench size
Georgi Gerganov [Thu, 16 Nov 2023 08:59:32 +0000 (10:59 +0200)]
bench : fix memcpy bench size

19 months agotalk-llama : improve quote and backtick handling (#1364)
Sam Pullara [Thu, 16 Nov 2023 08:34:05 +0000 (00:34 -0800)]
talk-llama : improve quote and backtick handling (#1364)

* ISSUE-1329: replace " with ' so it doesn't try to execute code in backticks.

* Typo

* Update to keep possessives in the output

Closes the ' then puts a ' in quotes then reopens the ' to escape the ' characters.

19 months agotalk-llama : enable GPU by default
Georgi Gerganov [Wed, 15 Nov 2023 19:32:25 +0000 (21:32 +0200)]
talk-llama : enable GPU by default

19 months agomodels : add info about distilled models
Georgi Gerganov [Wed, 15 Nov 2023 19:10:13 +0000 (21:10 +0200)]
models : add info about distilled models

19 months agorelease : v1.5.0
Georgi Gerganov [Wed, 15 Nov 2023 19:02:52 +0000 (21:02 +0200)]
release : v1.5.0

19 months agobench-all : add distil models
Georgi Gerganov [Wed, 15 Nov 2023 18:49:12 +0000 (20:49 +0200)]
bench-all : add distil models

19 months agojs : latest whisper.js
Georgi Gerganov [Wed, 15 Nov 2023 18:10:16 +0000 (20:10 +0200)]
js : latest whisper.js

19 months agobench-all : indentations
Georgi Gerganov [Wed, 15 Nov 2023 18:01:15 +0000 (20:01 +0200)]
bench-all : indentations

19 months agowhisper : make large version explicit + fix data size units (#1493)
Georgi Gerganov [Wed, 15 Nov 2023 17:42:25 +0000 (19:42 +0200)]
whisper : make large version explicit + fix data size units (#1493)

19 months agojava : fix test (#1492)
Georgi Gerganov [Wed, 15 Nov 2023 15:42:53 +0000 (17:42 +0200)]
java : fix test (#1492)

19 months agowhisper : add batched decoding (#1486)
Georgi Gerganov [Wed, 15 Nov 2023 14:12:52 +0000 (16:12 +0200)]
whisper : add batched decoding (#1486)

* whisper : add whisper_batch

* whisper : move kv_self to whisper_state

* whisper : full batched decoding support

* whisper : fix memory leak in whisper_batch

* whisper : fix mem leak again + remove oboslete function

* whisper : clear kv cache when using whisper_decode API

* whisper : speed-up sampling

* whisper : fix decoders initializer

* bench : add batch size 5 bench

* whisper : add comment about the KV cache size

* whisper : add check for max number of decoders

* whisper : avoid starting sampling threads with bs=1

* whisper : enable beam-search by default

* cuda : sync llama.cpp fixes

19 months agojava : use tiny.en for tests (#1484)
Georgi Gerganov [Mon, 13 Nov 2023 14:53:55 +0000 (16:53 +0200)]
java : use tiny.en for tests (#1484)

* java : use tiny.en for tests

* java : try to fix full params struct

19 months agowhisper : add grammar-based sampling (#1229)
Evan Jones [Mon, 13 Nov 2023 08:51:34 +0000 (03:51 -0500)]
whisper : add grammar-based sampling (#1229)

* whisper : add grammar-based sampling

* build : fix after master merge

* command : fix exception when recognizing the command

* whisper : fine-tuning grammar functionality

* command : grammar-related improvements

- option to read grammar from file
- add sample grammars for colors and chess moves
- fine-tune the performance further

* grammars : add assistant + update comments

* command : enable beam-search, add "no_timestamps", add "context", add p

* whisper : remove comment

---------

Co-authored-by: Georgi Gerganov <redacted>
19 months agotalk-llama : add n_gpu_layers parameter (#1475)
rlapray [Mon, 13 Nov 2023 08:04:16 +0000 (09:04 +0100)]
talk-llama : add n_gpu_layers parameter (#1475)

19 months agoexamples : add whisper.android.java for compatibility with older Android versions...
Tong Li [Sun, 12 Nov 2023 16:31:58 +0000 (06:31 -1000)]
examples : add whisper.android.java for compatibility with older Android versions using Java (#1382)

* save the recorded audio to a file

* Alignment -help

* Save the correct audio

* chage to a consistent coding style

* Correct typo

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* Correct variable misuse

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* add *.bin .cxx/ .gradle/ cmake-build-debug/ to gitignore

* add whisper.android.java

* Added support for older versions of Android of Java

* add examples for android java

* add README.md for android java

* add fullTranscribeWithTime

* 增加 toString()方法和测试

* change return type to void

* update to v1.4.1

* add WhisperService

* chage to whisper_full_get_segment_t1

* add method transcribeDataWithTime

* modified toString
```
return "[" + start + " --> " + end + "]:" + sentence;
```

* Optimize code logic

* update text view on handle

* set max lines

* change Chinese to English

* Update bindings/java/build.gradle

* Update .gitignore

* add android.java to github action

* chage android.java to   android_java in build.yml

* remove gradle

* chage jdk to temurin in android_java of CI

* chage jdk to temurin 11 in android_java of CI

* add x to gradlew

* set api-level for android_java of CI

* Update examples/whisper.android.java/app/src/main/jni/whisper/CMakeLists.txt

* add ndk version in build.gradle

* remove local.properties

* add testFullTranscribeWithTime

---------

Co-authored-by: litongmacos <redacted>
Co-authored-by: bobqianic <redacted>
19 months agoreadme : update comment about source code
Georgi Gerganov [Sun, 12 Nov 2023 15:47:37 +0000 (17:47 +0200)]
readme : update comment about source code

19 months agoggml : fix some compile warnings
Georgi Gerganov [Sun, 12 Nov 2023 14:36:20 +0000 (16:36 +0200)]
ggml : fix some compile warnings

19 months agoreadme : update GPU / CUDA
Georgi Gerganov [Sun, 12 Nov 2023 13:40:37 +0000 (15:40 +0200)]
readme : update GPU / CUDA

19 months agowhisper : add full CUDA and Metal offloading (#1472)
Georgi Gerganov [Sun, 12 Nov 2023 13:31:08 +0000 (15:31 +0200)]
whisper : add full CUDA and Metal offloading (#1472)

* whisper : migrate to ggml-backend

* whisper : fix logit reading

* whisper : fix tensor allocation during load

* whisper : fix beam-search with CUDA

* whisper : free backends + fix compile warning

* whisper : print when CUDA is enabled

* whisper : fix CoreML

* make : clean-up

* talk : fix compile warning

* whisper : support ggml_conv with CUDA and Metal (#1473)

* ggml : add CUDA support for ggml_conv

* whisper : remove ggml_repeat for conv bias + single backend

* cuda : fix im2col kernel

* metal : add im2col support + mul mat-vec f16 x f16

* bench-all : add q4 models

* whisper : clean-up

* quantize-all : fix

* ggml : im2col opts

* whisper : avoid whisper_model_data wrapper

* whisper : add note that ggml_mul_mat_pad does not work with CUDA

* whisper : factor out graph compute in common function

* whisper : fixes

* whisper : fix UB with measure buffers

* whisper : try to fix the parallel whisper_state functionality (#1479)

* whisper : try to fix the parallel whisper_state functionality

* whisper : fix multi-state Metal

* whisper : free backend instances in whisper_state

19 months agowhisper : return with error from whisper_encode_internal and whisper_decode_internal...
Ben Nortier [Fri, 10 Nov 2023 11:51:16 +0000 (13:51 +0200)]
whisper : return with error from whisper_encode_internal and whisper_decode_internal when abort callback is true (#1456)

Co-authored-by: Ben Nortier <redacted>
19 months agotalk-llama : add language auto detect (#1467)
Jakub Ráček [Thu, 9 Nov 2023 17:21:44 +0000 (18:21 +0100)]
talk-llama : add language auto detect (#1467)

* Add '-l auto' to talk-llama example

* Update examples/talk-llama/talk-llama.cpp

---------

Co-authored-by: Georgi Gerganov <redacted>
19 months agoopenvino : update convert-whisper-to-openvino.py to support v3 (#1459)
bobqianic [Thu, 9 Nov 2023 10:42:39 +0000 (10:42 +0000)]
openvino : update convert-whisper-to-openvino.py to support v3 (#1459)

19 months agocoreml : use the correct `n_mel` value (#1458)
Xiao-Yong Jin [Wed, 8 Nov 2023 20:01:41 +0000 (14:01 -0600)]
coreml : use the correct `n_mel` value (#1458)

19 months agowhisper : reset mel time when resetting timings (#1452)
Ben Nortier [Wed, 8 Nov 2023 13:52:23 +0000 (15:52 +0200)]
whisper : reset mel time when resetting timings (#1452)

Co-authored-by: Ben Nortier <redacted>
19 months agoios : add support for Swift Package Manager (#1370)
Sindre Sorhus [Tue, 7 Nov 2023 21:53:31 +0000 (04:53 +0700)]
ios : add support for Swift Package Manager (#1370)

* Add support for Swift

* Make it build in Xcode

* Use the SPM package in the SwiftUI example app

19 months agorelease : v1.4.3
Georgi Gerganov [Tue, 7 Nov 2023 14:15:48 +0000 (16:15 +0200)]
release : v1.4.3

19 months agoggml : fix MIN / MAX macro re-definition
Georgi Gerganov [Tue, 7 Nov 2023 14:08:46 +0000 (16:08 +0200)]
ggml : fix MIN / MAX macro re-definition

19 months agowhisper : add support for large v3 (#1444)
Georgi Gerganov [Tue, 7 Nov 2023 13:30:18 +0000 (15:30 +0200)]
whisper : add support for large v3 (#1444)

* whisper : add support for large v3

* bench : fix build + fix go bindings

* bench : fix n_mels

* models : update readme

19 months agoandroid : decouple example into a library and app module (#1445)
Tobrun [Tue, 7 Nov 2023 12:27:33 +0000 (13:27 +0100)]
android : decouple example into a library and app module (#1445)

19 months agowhisper : reset ctx->t_start_us when calling whisper_reset_timings() (#1434)
Ben Nortier [Tue, 7 Nov 2023 09:04:32 +0000 (11:04 +0200)]
whisper : reset ctx->t_start_us when calling whisper_reset_timings() (#1434)

Co-authored-by: Ben Nortier <redacted>
19 months agocmake : fix talk-llama build
Georgi Gerganov [Tue, 7 Nov 2023 09:03:21 +0000 (11:03 +0200)]
cmake : fix talk-llama build

19 months agometal : fix asserts for setThreadgroupMemoryLength (close #1435)
Georgi Gerganov [Tue, 7 Nov 2023 09:02:16 +0000 (11:02 +0200)]
metal : fix asserts for setThreadgroupMemoryLength (close #1435)

19 months agoci : fix variable names in GitHub actions config (#1440)
iamthad [Tue, 7 Nov 2023 08:53:24 +0000 (02:53 -0600)]
ci : fix variable names in GitHub actions config (#1440)

* Remove _SUPPORT from variables

* Change blasdir to OPENBLAS_PATH

* Update OpenBLAS URLs

19 months agotalk-llama : fix n_gpu_layers usage again (#1442)
Jhen-Jie Hong [Tue, 7 Nov 2023 08:51:27 +0000 (16:51 +0800)]
talk-llama : fix n_gpu_layers usage again (#1442)

19 months agowhisper : add missing about callback initializers
Georgi Gerganov [Tue, 7 Nov 2023 08:49:51 +0000 (10:49 +0200)]
whisper : add missing about callback initializers

19 months agoexamples : fix n_gpu_layers usage in talk-llama (#1441)
Jhen-Jie Hong [Tue, 7 Nov 2023 01:36:23 +0000 (09:36 +0800)]
examples : fix n_gpu_layers usage in talk-llama (#1441)

19 months agowhisper : add context param to disable gpu (#1293)
Jhen-Jie Hong [Mon, 6 Nov 2023 09:04:24 +0000 (17:04 +0800)]
whisper : add context param to disable gpu (#1293)

* whisper : check state->ctx_metal not null

* whisper : add whisper_context_params { use_gpu }

* whisper : new API with params & deprecate old API

* examples : use no-gpu param && whisper_init_from_file_with_params

* whisper.objc : enable metal & disable on simulator

* whisper.swiftui, metal : enable metal & support load default.metallib

* whisper.android : use new API

* bindings : use new API

* addon.node : fix build & test

* bindings : updata java binding

* bindings : add missing whisper_context_default_params_by_ref WHISPER_API for java

* metal : use SWIFTPM_MODULE_BUNDLE for GGML_SWIFT and reuse library load

* metal : move bundle var into block

* metal : use SWIFT_PACKAGE instead of GGML_SWIFT

* style : minor updates

---------

Co-authored-by: Georgi Gerganov <redacted>