mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-26 01:50:04 +00:00
Compare commits
1 Commits
java-bindi
...
0.0.5-3
Author | SHA1 | Date | |
---|---|---|---|
18d5ff8695 |
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@ -235,10 +235,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: whisper-blas-bin-${{ matrix.arch }}
|
name: whisper-blas-bin-${{ matrix.arch }}
|
||||||
path: build/bin/${{ matrix.build }}
|
path: build/bin/${{ matrix.build }}
|
||||||
|
|
||||||
windows-cublas:
|
windows-cublas:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build: [Release]
|
build: [Release]
|
||||||
@ -250,40 +250,40 @@ jobs:
|
|||||||
s2arc: x64
|
s2arc: x64
|
||||||
- sdl2: ON
|
- sdl2: ON
|
||||||
s2ver: 2.26.0
|
s2ver: 2.26.0
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Add msbuild to PATH
|
- name: Add msbuild to PATH
|
||||||
uses: microsoft/setup-msbuild@v1
|
uses: microsoft/setup-msbuild@v1
|
||||||
|
|
||||||
- name: Install CUDA Toolkit
|
- name: Install CUDA Toolkit
|
||||||
id: cuda-toolkit
|
id: cuda-toolkit
|
||||||
uses: Jimver/cuda-toolkit@v0.2.10
|
uses: Jimver/cuda-toolkit@v0.2.10
|
||||||
|
|
||||||
- name: Fetch SDL2 and set SDL2_DIR
|
- name: Fetch SDL2 and set SDL2_DIR
|
||||||
if: matrix.sdl2 == 'ON'
|
if: matrix.sdl2 == 'ON'
|
||||||
run: |
|
run: |
|
||||||
C:/msys64/usr/bin/wget.exe -qO sdl2.zip https://github.com/libsdl-org/SDL/releases/download/release-${{ matrix.s2ver }}/SDL2-devel-${{ matrix.s2ver }}-VC.zip
|
C:/msys64/usr/bin/wget.exe -qO sdl2.zip https://github.com/libsdl-org/SDL/releases/download/release-${{ matrix.s2ver }}/SDL2-devel-${{ matrix.s2ver }}-VC.zip
|
||||||
7z x sdl2.zip
|
7z x sdl2.zip
|
||||||
echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
|
echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: >
|
run: >
|
||||||
cmake -S . -B ./build -A ${{ matrix.arch }}
|
cmake -S . -B ./build -A ${{ matrix.arch }}
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
|
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
|
||||||
-DWHISPER_CUBLAS=1
|
-DWHISPER_CUBLAS=1
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cd ./build
|
cd ./build
|
||||||
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
|
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
|
||||||
|
|
||||||
- name: Copy SDL2.dll
|
- name: Copy SDL2.dll
|
||||||
if: matrix.sdl2 == 'ON'
|
if: matrix.sdl2 == 'ON'
|
||||||
run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
|
run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
|
||||||
|
|
||||||
- name: Upload binaries
|
- name: Upload binaries
|
||||||
if: matrix.sdl2 == 'ON'
|
if: matrix.sdl2 == 'ON'
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
@ -337,7 +337,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build objc example
|
- name: Build objc example
|
||||||
run: xcodebuild -project examples/whisper.objc/whisper.objc.xcodeproj -scheme whisper.objc -configuration ${{ matrix.build }} -sdk iphonesimulator build
|
run: xcodebuild -project examples/whisper.objc/whisper.objc.xcodeproj -scheme whisper.objc -configuration ${{ matrix.build }} -sdk iphonesimulator build
|
||||||
|
|
||||||
- name: Build swiftui example
|
- name: Build swiftui example
|
||||||
run: xcodebuild -project examples/whisper.swiftui/whisper.swiftui.xcodeproj -scheme WhisperCppDemo -configuration ${{ matrix.build }} -sdk iphonesimulator build
|
run: xcodebuild -project examples/whisper.swiftui/whisper.swiftui.xcodeproj -scheme WhisperCppDemo -configuration ${{ matrix.build }} -sdk iphonesimulator build
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
distribution: zulu
|
distribution: zulu
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
uses: android-actions/setup-android@v2
|
uses: android-actions/setup-android@v2
|
||||||
|
|
||||||
|
64
.github/workflows/release-deb.yml
vendored
Normal file
64
.github/workflows/release-deb.yml
vendored
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
name: release-deb
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
set -x -e
|
||||||
|
VERSION=$(echo $GITHUB_REF | cut --delimiter=/ -f 3)
|
||||||
|
ID="whisper-cpp-small_${VERSION}_amd64"
|
||||||
|
|
||||||
|
echo "PKG_VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
echo "PKG_ID=$ID" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Install deps
|
||||||
|
run: |
|
||||||
|
sudo apt install -y --no-install-recommends intel-mkl
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cmake -S . -B build-release -D BUILD_SHARED_LIBS=OFF
|
||||||
|
cd build-release
|
||||||
|
make
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Create package tree
|
||||||
|
env:
|
||||||
|
GITHUB_REPO: ${{ github.repository }}
|
||||||
|
run: |
|
||||||
|
export ROOT=$PKG_ID/opt/project/whisper.cpp
|
||||||
|
mkdir -p $ROOT/bin
|
||||||
|
mkdir -p $ROOT/share
|
||||||
|
mkdir -p $PKG_ID/DEBIAN
|
||||||
|
|
||||||
|
cp build-release/bin/main $ROOT/bin/whisper
|
||||||
|
cp -r contrib/debian/control $PKG_ID/DEBIAN/
|
||||||
|
|
||||||
|
echo "Version: $PKG_VERSION" >> $PKG_ID/DEBIAN/control
|
||||||
|
echo "Git-Repo: $GITHUB_REPO" >> $PKG_ID/DEBIAN/control
|
||||||
|
echo "Git-Commit: $GITHUB_SHA" >> $PKG_ID/DEBIAN/control
|
||||||
|
|
||||||
|
models/download-ggml-model.sh small
|
||||||
|
build-release/bin/quantize models/ggml-small.bin \
|
||||||
|
$ROOT/share/ggml-small-q5_1.bin q5_1
|
||||||
|
|
||||||
|
- name: Create deb package
|
||||||
|
run: |
|
||||||
|
mkdir artifacts
|
||||||
|
dpkg-deb --build --root-owner-group $PKG_ID
|
||||||
|
|
||||||
|
- name: Upload Release Asset
|
||||||
|
uses: xresloader/upload-to-github-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
release_id: ${{ github.event.release.id }}
|
||||||
|
file: ${{ env.PKG_ID }}.deb
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,6 +5,7 @@
|
|||||||
.test/
|
.test/
|
||||||
.vs/
|
.vs/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
.idea/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
build/
|
build/
|
||||||
@ -16,6 +17,7 @@ build-cublas/
|
|||||||
build-no-accel/
|
build-no-accel/
|
||||||
build-sanitize-addr/
|
build-sanitize-addr/
|
||||||
build-sanitize-thread/
|
build-sanitize-thread/
|
||||||
|
cmake-build-debug/
|
||||||
|
|
||||||
/main
|
/main
|
||||||
/stream
|
/stream
|
||||||
|
5
contrib/debian/control
Normal file
5
contrib/debian/control
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Package: whisper-small-cpp
|
||||||
|
Architecture: amd64
|
||||||
|
Maintainer: Alexey Kharlamov <alexey@kharlamov.biz>
|
||||||
|
Description: Whisper Speech to Text Converter
|
||||||
|
Depends: libc6 (>= 2.2.1), intel-mkl
|
Reference in New Issue
Block a user