Skip to content

Commit 15be134

Browse files
committed
Add CI workflow for testing and update model registration
1 parent c788686 commit 15be134

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

.github/workflows/test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [ main, dev, develop ]
6+
pull_request:
7+
branches: [ main, dev, develop ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
name: Test on ${{ matrix.os }} with Python ${{ matrix.python-version }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, macos-latest]
18+
python-version: ['3.10', '3.11', '3.12']
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
submodules: recursive
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Cache pip dependencies
31+
uses: actions/cache@v4
32+
with:
33+
path: ~/.cache/pip
34+
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
35+
restore-keys: |
36+
${{ runner.os }}-pip-
37+
38+
- name: Install dependencies
39+
run: |
40+
python -m pip install --upgrade pip setuptools wheel
41+
pip install -e .[test]
42+
43+
- name: Run tests with pytest
44+
run: |
45+
python tests/model_test.py

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
readme="README.md",
2121
python_requires=">=3.8",
2222
install_requires=[
23+
"kaldi-native-fbank",
2324
"modelscope>=1.18.0",
2425
"funasr>=1.1.6",
2526
"lhotse>=1.24.2",
2627
"kaldialign",
2728
"torch",
29+
"torchaudio",
2830
],
2931
extras_require={
3032
"test": [
@@ -42,6 +44,7 @@
4244
"Programming Language :: Python :: 3.11",
4345
"Programming Language :: Python :: 3.12",
4446
"Programming Language :: Python :: 3.13",
47+
"Programming Language :: Python :: 3.14",
4548
"Intended Audience :: Science/Research",
4649
"Operating System :: POSIX :: Linux",
4750
"Operating System :: MacOS :: MacOS X",

src/omnisense/models/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ def forward(
562562
return xs_pad, olens
563563

564564

565-
@tables.register("model_classes", "SenseVoiceSmall")
565+
@tables.register("model_classes", "iic/SenseVoiceSmall")
566566
class SenseVoiceSmall(nn.Module):
567567
"""CTC-attention hybrid Encoder-Decoder model"""
568568

0 commit comments

Comments
 (0)