Comments (4)
The result for the SSB dataset is unacceptable. I do not change any configuration. Does anyone know the reason? THKS
from funasr.
请问您这个流式返回是怎么实现的,求解。
from funasr.
@Akmend Use the code examples showed on thsi project. Keep in mind that the input wav file must be 16K sampling rate
`
import os
import soundfile
from funasr import AutoModel
model_path = r"data/model_hub/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online"
wav_path = r'/home/workspace/lwm/AwesomeCode/FunASR/SSB00050001.wav'
chunk_size = [0, 10, 5] # [0, 10, 5] 600ms, [0, 8, 4] 480ms
encoder_chunk_look_back = 4 # number of chunks to lookback for encoder self-attention
decoder_chunk_look_back = 1 # number of encoder chunks to lookback for decoder cross-attention
model = AutoModel(model=model_path)
wav_file = os.path.join(model.model_path, wav_path)
speech, sample_rate = soundfile.read(wav_file)
chunk_stride = chunk_size[1] * 960 # 600ms
cache = {}
total_chunk_num = int(len((speech) - 1) / chunk_stride + 1)
for i in range(total_chunk_num):
speech_chunk = speech[i * chunk_stride:(i + 1) * chunk_stride]
is_final = i == total_chunk_num - 1
res = model.generate(input=speech_chunk,
cache=cache,
is_final=is_final,
chunk_size=chunk_size,
encoder_chunk_look_back=encoder_chunk_look_back,
decoder_chunk_look_back=decoder_chunk_look_back)
print(res)
`
from funasr.
Show me the srv code.
from funasr.
Related Issues (20)
- 进入容器运行后,退出容器,容器立刻关闭 HOT 1
- Whisper is translating my non-English audio into English HOT 2
- 返回时间戳有bug,导致json解析失败 HOT 1
- websocket 协议文档中,在 offline 模式下 is_final 字段是没有用处的
- 采样率问题 HOT 1
- 按照首页教程执行后报错:AssertionError: iic/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch is not registered HOT 1
- 加载python中的websock非常慢,耗时很长
- 现在FunAsr能否支持类似讯飞的动态修正的功能? HOT 1
- 内容无法识别 HOT 1
- How is the FP16 model trained?
- 说话人识别怎么识别不出来了啊,都是spk 0 HOT 1
- vad model的rtf为0.831是正常的吗?
- 微调iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch模型,请问大概需要多少条数据啊?我看data\list\train.jsonl里就三条数据
- 使用pipeline进行ASR时,当输入是scp文件,进程不解除输出目录的文件占用
- 使用speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch模型进行微调,导入模型失败。
- funasr.AutoModel.generate推理前强制报错+循环引用报错
- vad 采样率问题
- html始终连接失败 HOT 3
- 微调模型,数据中未收录的单词并未影响预测结果 HOT 4
- 请问有没有paraformer实时和vad实时的一体的gpu调用方法,以及vad录音输入问题 HOT 2
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.