mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-08-13 18:07:54 +02:00
.devops
.github
bindings
ci
cmake
examples
ggml
grammars
include
models
.gitignore
README.md
convert-h5-to-coreml.py
convert-h5-to-ggml.py
convert-pt-to-ggml.py
convert-whisper-to-coreml.py
convert-whisper-to-openvino.py
download-coreml-model.sh
download-ggml-model.cmd
download-ggml-model.sh
for-tests-ggml-base.bin
for-tests-ggml-base.en.bin
for-tests-ggml-large.bin
for-tests-ggml-medium.bin
for-tests-ggml-medium.en.bin
for-tests-ggml-small.bin
for-tests-ggml-small.en.bin
for-tests-ggml-tiny.bin
for-tests-ggml-tiny.en.bin
generate-coreml-interface.sh
generate-coreml-model.sh
ggml_to_pt.py
requirements-coreml.txt
requirements-openvino.txt
samples
scripts
src
tests
.gitignore
.gitmodules
AUTHORS
CMakeLists.txt
LICENSE
Makefile
README.md
README_sycl.md
build-xcframework.sh
close-issue.yml
* scripts : update sync [no ci] * files : reorganize [no ci] * sync : llama.cpp * cmake : link math library * cmake : build normal ggml library * files : move headers to include * objc : fix path to ggml-metal.h * ci : fix WHISPER_CUDA -> GGML_CUDA * scripts : sync LICENSE [no ci]
30 lines
1.5 KiB
Bash
Executable File
30 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# This generates:
|
|
# - src/coreml/whisper-encoder-impl.h and src/coreml/whisper-encoder-impl.m
|
|
# - src/coreml/whisper-decoder-impl.h and src/coreml/whisper-decoder-impl.m
|
|
#
|
|
|
|
wd=$(dirname "$0")
|
|
cd "$wd/../" || exit
|
|
|
|
python3 models/convert-whisper-to-coreml.py --model tiny.en
|
|
|
|
mv -v models/coreml-encoder-tiny.en.mlpackage models/whisper-encoder-impl.mlpackage
|
|
xcrun coremlc generate models/whisper-encoder-impl.mlpackage src/coreml/
|
|
mv src/coreml/whisper_encoder_impl.h src/coreml/whisper-encoder-impl.h
|
|
mv src/coreml/whisper_encoder_impl.m src/coreml/whisper-encoder-impl.m
|
|
sed -i '' 's/whisper_encoder_impl\.h/whisper-encoder-impl.h/g' src/coreml/whisper-encoder-impl.m
|
|
sed -i '' 's/whisper_encoder_impl\.m/whisper-encoder-impl.m/g' src/coreml/whisper-encoder-impl.m
|
|
sed -i '' 's/whisper_encoder_impl\.h/whisper-encoder-impl.h/g' src/coreml/whisper-encoder-impl.h
|
|
|
|
mv -v models/coreml-decoder-tiny.en.mlpackage models/whisper-decoder-impl.mlpackage
|
|
xcrun coremlc generate models/whisper-decoder-impl.mlpackage src/coreml/
|
|
mv src/coreml/whisper_decoder_impl.h src/coreml/whisper-decoder-impl.h
|
|
mv src/coreml/whisper_decoder_impl.m src/coreml/whisper-decoder-impl.m
|
|
sed -i '' 's/whisper_decoder_impl\.h/whisper-decoder-impl.h/g' src/coreml/whisper-decoder-impl.m
|
|
sed -i '' 's/whisper_decoder_impl\.m/whisper-decoder-impl.m/g' src/coreml/whisper-decoder-impl.m
|
|
sed -i '' 's/whisper_decoder_impl\.h/whisper-decoder-impl.h/g' src/coreml/whisper-decoder-impl.h
|
|
|
|
rm -rfv models/whisper-encoder-impl.mlpackage models/whisper-decoder-impl.mlpackage
|