Spaces:
Sleeping
Sleeping
Commit
·
f7d45d6
1
Parent(s):
1f1a7e2
add examples
Browse files- app.py +1 -1
- examples.py +24 -0
app.py
CHANGED
|
@@ -26,7 +26,7 @@ import time
|
|
| 26 |
import urllib.request
|
| 27 |
from datetime import datetime
|
| 28 |
|
| 29 |
-
|
| 30 |
import gradio as gr
|
| 31 |
import soundfile as sf
|
| 32 |
|
|
|
|
| 26 |
import urllib.request
|
| 27 |
from datetime import datetime
|
| 28 |
|
| 29 |
+
from examples import examples
|
| 30 |
import gradio as gr
|
| 31 |
import soundfile as sf
|
| 32 |
|
examples.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
#
|
| 3 |
+
# Copyright 2022-2024 Xiaomi Corp. (authors: Fangjun Kuang)
|
| 4 |
+
#
|
| 5 |
+
# See LICENSE for clarification regarding multiple authors
|
| 6 |
+
#
|
| 7 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 8 |
+
# you may not use this file except in compliance with the License.
|
| 9 |
+
# You may obtain a copy of the License at
|
| 10 |
+
#
|
| 11 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 12 |
+
#
|
| 13 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 14 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 15 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 16 |
+
# See the License for the specific language governing permissions and
|
| 17 |
+
# limitations under the License.
|
| 18 |
+
|
| 19 |
+
waves = [f"{i}.wav" for i in range(1, 14)]
|
| 20 |
+
|
| 21 |
+
examples = [
|
| 22 |
+
["k2-fsa/sherpa-onnx-zipformer-small-audio-tagging-2024-04-15", f"./test_wavs/{w}"]
|
| 23 |
+
for w in wavs
|
| 24 |
+
]
|