Merge branch 'master' into cuda-and-opencl-support
This commit is contained in:
commit
997bc936e4
3 changed files with 53 additions and 11 deletions
54
.github/workflows/pr.yml
vendored
54
.github/workflows/pr.yml
vendored
|
|
@ -5,6 +5,52 @@ on:
|
|||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
rustfmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code into the proper directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Cache rust
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Install rust
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --check
|
||||
|
||||
|
||||
clippy:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
rust-version: [stable, nightly]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Check out code into the proper directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Cache rust
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Install rust
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{ matrix.rust-version }}
|
||||
components: clippy
|
||||
|
||||
- name: Check clippy lints
|
||||
run: cargo clippy
|
||||
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -25,10 +71,6 @@ jobs:
|
|||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{ matrix.rust-version }}
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --check
|
||||
|
||||
- name: Check clippy lints
|
||||
run: cargo clippy
|
||||
- name: Check build
|
||||
run: cargo build --verbose
|
||||
|
|
|
|||
|
|
@ -275,16 +275,16 @@ impl WhisperContext {
|
|||
unsafe { whisper_rs_sys::whisper_model_n_mels(self.ctx) }
|
||||
}
|
||||
|
||||
/// Get model_f16.
|
||||
/// Get model_ftype.
|
||||
///
|
||||
/// # Returns
|
||||
/// c_int
|
||||
///
|
||||
/// # C++ equivalent
|
||||
/// `int whisper_model_f16 (struct whisper_context * ctx);`
|
||||
/// `int whisper_model_ftype (struct whisper_context * ctx);`
|
||||
#[inline]
|
||||
pub fn model_f16(&self) -> c_int {
|
||||
unsafe { whisper_rs_sys::whisper_model_f16(self.ctx) }
|
||||
pub fn model_ftype(&self) -> c_int {
|
||||
unsafe { whisper_rs_sys::whisper_model_ftype(self.ctx) }
|
||||
}
|
||||
|
||||
/// Get model_type.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 5108b30e6daf361c856abb6b86e5038500bdbeb1
|
||||
Subproject commit 9c61f5f58555bb136b71b391b40f956328f18dd5
|
||||
Loading…
Add table
Add a link
Reference in a new issue