Comments (4)
check your audio
egs:
import argparse
import wave
import os
def short_wav(file_path, duration_threshold):
with wave.open(file_path, 'rb') as wav_file:
duration = wav_file.getnframes() / float(wav_file.getframerate())
return duration < duration_threshold
def find_short_wavs(directory, duration_threshold):
short_wavs = []
for root, dirs, files in os.walk(directory):
for file in files:
if file.endswith('.wav'):
file_path = os.path.join(root, file)
if short_wav(file_path, duration_threshold):
short_wavs.append(file_path)
return short_wavs
def main():
parser = argparse.ArgumentParser(description="Check Audio")
parser.add_argument("dir", help="search for .wav files")
parser.add_argument("--threshold", type=float, default=0.4, help="Duration threshold for considering a .wav file short (in seconds)")
args = parser.parse_args()
short_wavs = find_short_wavs(args.directory, args.threshold)
print("Audio wav ".format(args.threshold))
for file_path in short_wavs:
print(file_path)
if __name__ == "__main__":
main()
from funasr.
已解决,谢谢!
from funasr.
已解决,谢谢!
请问你是怎么解决的
from funasr.
是因为时长太短了吗
from funasr.
Related Issues (20)
- gpu跑paraformer larger onnx模型时候,模型内部出现维度不匹配错误 HOT 6
- 你好,如果我要实现流式说话人识别,这个做流式聚类可以吗? HOT 4
- 离线模型和在线模型有什么区别,cache里面有什么内容是在线模型需要缓存的。 HOT 1
- 对auto_model,py中代码逻辑的不理解 HOT 2
- Paraformer model finetune OOM HOT 2
- seaco-paraformer训练时seaco标签问题 HOT 3
- funasr是否能将直播流中的音频转录为文字 HOT 2
- 使用GPU进行模型语音转义进程CoreDump HOT 2
- IndexError: index 6802 is out of bounds for dimension 0 with size 6802 HOT 4
- RuntimeError: The size of tensor a (3) must match the size of tensor b (4) at non-singleton dimension 1 HOT 20
- docker镜像部署,推理后内存持续增长未被释放,空闲时内存占用仍处于高位 HOT 1
- 有 flutter demo吗 HOT 4
- 为什么使用paraformer-large模型的长音频版运行finetune.sh脚本,还是无法识别20s以上的音频文件 HOT 1
- 作者们好,请问流式asr文本修正是在哪里做的,我只想要获取文本修正之后的结果 HOT 1
- 请问有c/c++版本的online fsmn vad吗?
- Funasr导出预训练模型的ONNX出现问题! HOT 4
- 说话人分割,用新闻联播音频,男女主持人的“晚上好”无法区分成两个人 HOT 3
- speaker id 不是递增的 HOT 1
- streaming hotwords HOT 1
- Funasr has a problem exporting ONNX of the pre-trained model【Funasr导出预训练模型的ONNX出现问题】 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from funasr.