Skip to content

Timestamp error may caused by audio file. #173

Open
@Huowuge

Description

@Huowuge

Notice: In order to resolve issues more efficiently, please raise issue following the template.
(注意:为了更加高效率解决您遇到的问题,请按照模板提问,补充细节)

🐛 Bug

Run timestamp error

To Reproduce

funasr version: 1.2.0.
Downloading Model to directory: C:\Users\huowuge.cache\modelscope\hub\iic/SenseVoiceSmall
2024-12-21 22:49:58,457 - modelscope - WARNING - Using branch: master as version is unstable, use with caution
Downloading Model to directory: C:\Users\huowuge.cache\modelscope\hub\iic/speech_fsmn_vad_zh-cn-16k-common-pytorch
2024-12-21 22:50:01,588 - modelscope - WARNING - Using branch: master as version is unstable, use with caution
Downloading Model to directory: C:\Users\huowuge.cache\modelscope\hub\iic/punc_ct-transformer_cn-en-common-vocab471067-large
2024-12-21 22:50:02,127 - modelscope - WARNING - Using branch: master as version is unstable, use with caution
Building prefix dict from the default dictionary ...
DEBUG:jieba:Building prefix dict from the default dictionary ...
Loading model from cache C:\Users\huowuge\AppData\Local\Temp\jieba.cache
DEBUG:jieba:Loading model from cache C:\Users\huowuge\AppData\Local\Temp\jieba.cache
Loading model cost 0.591 seconds.
DEBUG:jieba:Loading model cost 0.591 seconds.
Prefix dict has been built successfully.
DEBUG:jieba:Prefix dict has been built successfully.
rtf_avg: 6.220: 100%|██████████| 1/1 [00:12<00:00, 12.07s/it]
0%| | 0/1 [00:00<?, ?it/s]
0%| | 0/9 [00:00<?, ?it/s]C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\IndexKernel.cu:92: block: [0,0,0], thread: [1,0,0] Assertion -sizes[i] <= index && index < sizes[i] && "index out of bounds" failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\IndexKernel.cu:92: block: [0,0,0], thread: [2,0,0] Assertion -sizes[i] <= index && index < sizes[i] && "index out of bounds" failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\IndexKernel.cu:92: block: [0,0,0], thread: [3,0,0] Assertion -sizes[i] <= index && index < sizes[i] && "index out of bounds" failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\IndexKernel.cu:92: block: [0,0,0], thread: [4,0,0] Assertion -sizes[i] <= index && index < sizes[i] && "index out of bounds" failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\IndexKernel.cu:92: block: [0,0,0], thread: [5,0,0] Assertion -sizes[i] <= index && index < sizes[i] && "index out of bounds" failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\IndexKernel.cu:92: block: [0,0,0], thread: [6,0,0] Assertion -sizes[i] <= index && index < sizes[i] && "index out of bounds" failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\IndexKernel.cu:92: block: [0,0,0], thread: [7,0,0] Assertion -sizes[i] <= index && index < sizes[i] && "index out of bounds" failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\IndexKernel.cu:92: block: [0,0,0], thread: [8,0,0] Assertion -sizes[i] <= index && index < sizes[i] && "index out of bounds" failed.
Traceback (most recent call last):
File "D:\projects\funasr\asr_en\asr.py", line 19, in
res = model.generate(
^^^^^^^^^^^^^^^
File "D:\projects\funasr.venv\Lib\site-packages\funasr\auto\auto_model.py", line 304, in generate
return self.inference_with_vad(input, input_len=input_len, **cfg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\projects\funasr.venv\Lib\site-packages\funasr\auto\auto_model.py", line 458, in inference_with_vad
results = self.inference(
^^^^^^^^^^^^^^^
File "D:\projects\funasr.venv\Lib\site-packages\funasr\auto\auto_model.py", line 343, in inference
res = model.inference(**batch, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\projects\funasr.venv\Lib\site-packages\funasr\models\sense_voice\model.py", line 932, in inference
pred = groupby(align[0, : encoder_out_lens[0]])
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

0%| | 0/9 [00:02<?, ?it/s]
0%| | 0/1 [00:03<?, ?it/s]

Code sample

Expected behavior

Environment

  • OS (e.g., Linux): windows11
  • FunASR Version (e.g., 1.0.0):1.20
  • ModelScope Version (e.g., 1.11.0): latest
  • PyTorch Version (e.g., 2.0.0): 2.31
  • How you installed funasr (pip, source): pip
  • Python version:3.11
  • GPU (e.g., V100M32): 1080Ti
  • CUDA/cuDNN version (e.g., cuda11.7): 11.8+gpu
  • Docker version (e.g., funasr-runtime-sdk-cpu-0.4.1)
  • Any other relevant information:

Additional context

The error may caused by the audio, since I split the input audio into short parts, the error still accurs when processing the first audio, the following audios can proceed successfully.
I updated the input audio to DingDing Group in 2024/12/13, the file name is Into+the+Uncut+Grass+-+Trevor+Noah.mp3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions