Commit Graph

2759 Commits

Author SHA1 Message Date
passerbya
5ee2f382b3
FIX 'NoneType' object has no attribute 'isalpha' (#2440)
Traceback (most recent call last):
  File "/root/miniconda3/envs/sensevoice/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/root/miniconda3/envs/sensevoice/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/data2/workspace/egs_vocal_extractor/data/speech_det.py", line 156, in process_audio_task
    res = model.generate(
  File "/root/miniconda3/envs/sensevoice/lib/python3.10/site-packages/funasr/auto/auto_model.py", line 306, in generate
    return self.inference_with_vad(input, input_len=input_len, **cfg)
  File "/root/miniconda3/envs/sensevoice/lib/python3.10/site-packages/funasr/auto/auto_model.py", line 464, in inference_with_vad
    results = self.inference(
  File "/root/miniconda3/envs/sensevoice/lib/python3.10/site-packages/funasr/auto/auto_model.py", line 345, in inference
    res = model.inference(**batch, **kwargs)
  File "/root/miniconda3/envs/sensevoice/lib/python3.10/site-packages/funasr/models/sense_voice/model.py", line 950, in inference
    timestamp = self.post(timestamp)
  File "/root/miniconda3/envs/sensevoice/lib/python3.10/site-packages/funasr/models/sense_voice/model.py", line 973, in post
    elif prev_word.isalpha() and prev_word.isascii() and word.isalpha() and word.isascii():
AttributeError: 'NoneType' object has no attribute 'isalpha'
2025-03-20 23:01:05 +08:00
天地
6e69d784e4
1. bug fix:list(mean)和list(var),由于mean和var是numpy,导致写入到文件的格式错误,参考上面的话,大概率是list(mean.tolist()),其实外层list没有必要 (#2437)
2. 删除不必要的代码list(numpy_array.tolist())-->numpy_array.tolist()
3. 性能优化:replace没有必要,性能慢,性能为O(nm),n是源字符串长度,m是需要替换的字符串长度,虽然这里的m长度是1,且list转字符串的"[]",只有首尾有,直接拼接即可。

Co-authored-by: tiandiweizun <qq1274949542@163.com>
2025-03-19 23:10:13 +08:00
Han Zhang
3c349ac053
fix: use converted token_ids for alignment for sensevoice model with timestamp output (#2429)
* fix: use converted token_ids for alignment

BPE doesn't guarantee converted ids (subwords) are revertible. which means `tokens` converted back is not always the same as `token_int`. A easy fix is to directly use the converted ids for alignment. Since they are from the same text, it shouldn't matter.

* fix: handle empty string

to index an empty string is to raise an exception. 这里没有判空。
2025-03-18 11:45:37 +08:00
游雁
93c701bab6 v1.2.6 2025-03-11 14:26:35 +08:00
Shi Xian
700cb827f5
Revert "# 增强说话人分离功能的时间戳支持" 2025-03-11 13:54:23 +08:00
hohaiuhsx
6fe10a8dbf
修复 当选用SenseVoice模型处理长音频(同时开启vad和output_timestamp)时的异常 (#2413) 2025-03-10 23:16:22 +08:00
游雁
9c67d9b969 v1.2.5 2025-03-07 23:41:54 +08:00
msgk
a8591060d3 fix(spk): 修复 speaker embedding 集群后的重新排序问题
- 增加了对时间戳支持的检查
- 初始化 punc_res 变量以处理不同情况
- 根据模型情况设置 punc_res,包括内部标点模型、外部标点模型和仅时间戳情况
- 修复了缺少标点模型时的错误处理
2025-02-14 14:16:51 +08:00
游雁
53ac0cb401 v1.2.4 2025-02-13 14:16:05 +08:00
游雁
604ae30fdb oom fix 2025-02-13 14:06:03 +08:00
游雁
001a66bbfe oom fix 2025-02-11 10:08:19 +08:00
BienBoy
6ebf6e48eb
fix: resolve CPU runtime error introduced by previous commit (c1e365f) (#2375)
Fixed a bug that caused a runtime error when running the model on CPU, which was introduced in commit c1e365fea0. The error was related to incorrect handling of device placement.
2025-02-05 17:47:20 +08:00
BienBoy
c1e365fea0
fix: resolve unexpected 'out of memory' issue in multi-GPU setup (#2373)
Fixed a bug where calling torch.cuda.empty_cache() caused extra memory usage on 'cuda:0', leading to unexpected 'out of memory' errors in multi-GPU environments.

Reference:
- https://github.com/pytorch/pytorch/issues/25752
- https://github.com/pytorch/pytorch/issues/144025
2025-02-01 23:29:34 +08:00
游雁
c4e7014492 v1.2.3 2025-01-24 16:59:23 +08:00
游雁
23c6d67288 emotion2vec 2025-01-16 11:25:36 +08:00
takipipo
3530688e0a
Make Emotion2vec support onnx (#2359)
* Make emotion2vec exportable to onnx

* Make export_meta of emotion2vec consistence with other models

* Include layer norm in the exported onnx model
2025-01-16 10:33:23 +08:00
游雁
d4f13c2e44 step_or_epoch bugfix 2025-01-10 10:16:11 +08:00
游雁
e6fe602db3 step_or_epoch bugfix 2025-01-10 10:14:30 +08:00
maliubiao
172a3152b4
允许 model.generate 使用bytes io, 以便不写入文件,节省io时间 (#2343) 2024-12-29 22:33:22 +08:00
游雁
a3a1c55c4c v1.2.2 2024-12-25 17:27:10 +08:00
zhifu gao
3f8294b9d7
Revert "shfit to shift (#2266)" (#2336)
This reverts commit 1367973f98.
2024-12-25 17:16:11 +08:00
Zhanzhao (Deo) Liang
8c7b7e5feb
fix export_meta import of sense voice (#2334) 2024-12-25 16:40:29 +08:00
Rin Arakaki
1367973f98
shfit to shift (#2266) 2024-12-24 17:51:31 +08:00
Zhiming Wang
d2cd95bd67
utils.install_model_requirements: support installing with uv (#2329)
When using the uv[1] package manager, pip commands need to be proxied through
uv's pip compatible interface[2]. Calling pip directly causes a
FileNotFoundError.

[1] https://docs.astral.sh/uv/
[2] https://docs.astral.sh/uv/pip/packages/
2024-12-24 09:59:37 +08:00
游雁
d32e112894 bug fix 2024-12-23 21:24:55 +08:00
游雁
1e5ef6ed9a bug fix 2024-12-23 19:06:50 +08:00
zhong zhuang
fcb2102a60
Fix seaco onnx export bug (#2325) 2024-12-21 17:14:35 +08:00
Kun Zou
b5ad7c81be
Support eparaformer model on aishell1 recipe (#2327) 2024-12-21 17:13:46 +08:00
游雁
fdafd3f6bc emotion2vec 2024-12-17 11:15:53 +08:00
游雁
2139ef696b v1.2.0 2024-12-12 11:37:59 +08:00
游雁
5f48457cf1 v1.1.18 2024-12-12 11:37:23 +08:00
游雁
41785b1daf v1.1.18 2024-12-12 11:35:27 +08:00
游雁
bb0017a686 bugfix 2024-12-12 11:35:06 +08:00
游雁
0f3d2d1266 v1.1.17 2024-12-11 14:21:57 +08:00
游雁
92586a4a90 fix bytes 2024-12-10 17:43:58 +08:00
shixian
026b8e3fdc update sensevoice small with timestamp 2024-12-05 19:29:19 +08:00
shixian
e71546b06d debug 2024-12-05 15:14:47 +08:00
Thomas Young
46721dc84a
fix export error if using cpu device; fix model path (#2265)
Co-authored-by: siyuan.yang <siyuan.yang@sophgo.com>
2024-12-05 11:01:29 +08:00
will_wang
0c3c9be2c4
paraformer onnx fp16导出方案 (#2264)
* onnx fp16模型

* paraformer-offline [fp32 fp16 onnx-gpu]

* paraformer-offline [fp32 fp16 onnx-gpu]

* Update export.py

---------

Co-authored-by: zhifu gao <zhifu.gzf@alibaba-inc.com>
2024-12-04 17:47:31 +08:00
Tang Linjie
8b1be8c3cb
feat: speed up fbank's lfr (#2246)
Co-authored-by: linjie.tang <linjie.tang@sophgo.com>
2024-11-30 13:05:39 +08:00
游雁
294e9e7d4b v1.1.16 2024-11-28 15:53:41 +08:00
游雁
4b3a28cbc5 pcm unfix 2024-11-28 15:53:17 +08:00
游雁
62aaba1940 print 2024-11-28 15:48:37 +08:00
pointerhacker
37d6930561
fix:添加音频码率验证以防止模型异常 (#2219)
Co-authored-by: zhaochaojin <zhaochaojin@didiglobal.com>
2024-11-20 18:39:05 +08:00
Steve Li
8cd0d4aab7
Add bounds check for postprocess_utils.py abbr_dispose() (#2209)
"/Users/{USER}/.pyenv/versions/funasr_usage/lib/python3.12/site-packages/funasr/utils/postprocess_utils.py", line 127, in abbr_dispose
    end = time_stamp[ts_nums[num]][1]
          ~~~~~~~~~~^^^^^^^^^^^^^^
IndexError: list index out of range
2024-11-15 11:03:31 +08:00
zhifu gao
5f25e809c5
Update version.txt 2024-11-05 16:33:27 +08:00
游雁
53a06e3c1a fix(register): 修改注册重复键值的处理方式
更新注册系统,在尝试注册已存在的键值时,从抛出异常改为打印提示信息并重新注册。
2024-11-01 09:41:16 +08:00
游雁
7699a35d2c v1.1.12 2024-10-29 15:13:14 +08:00
Truco
1a45b647a8
perf(models/FsmnVADStreaming): optimize GetFrameState and PopDataToOutputBuf (#2177)
- In GetFrameState(), pass generator to sum() instead of generating a list, ~10% gain in a 21s sample
- In GetFrameState(), cast `sum_score` (a tensor) to float to reduce calling to tensor lib,
  ~13% gain in a 23s example
- In PopDataToOutputBuf(), remove unused `out_pos` and related calculation, ~10% gain in a 27s sample
2024-10-28 13:41:38 +08:00
StevenH
1254e8aee1
optimize ComputeDecibel in fsmn-vad model by using numpy (#2174) 2024-10-26 12:19:07 +08:00