* Fix crash in ASR tasks when lm is set to none in #2237
* fix#2587: Resolve VAD multithreading issue
* Update funasr/models/fsmn_vad_streaming/model.py
ok
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Allow one to set a custom progress callback
so that they can show it own progrss bar
* Uncomment an existing test
* restore indentation
---------
Co-authored-by: Tony Mak <tony@Tonys-MacBook-Air-1802.local>
The example code in README files was updated to use the correct import path for Paraformer from the runtime package instead of the top-level module. The wav path was also modified to use Path.home() for cross-platform compatibility and to include the missing 'models' directory in the cache path. These changes ensure the examples work correctly with the current package structure.
* Fix wandb log
* fix validation loss is not logged
batch_idx got reset for each epoch.
use the global step counter instead
* LR should only be updated per step, not per step+ per epoch
* add early stopping
* Fix bf16 handling
scaler is only needed for fp16
* more logs
---------
Co-authored-by: Tony Mak <tony@Tonys-MacBook-Air-1800.local>
* Update model.py
Avoid exception of "IndexError: index 1 is out of bounds for dimension 1 with size 0"
* Update model.py
Add return word in timestamps
* Revert "Update model.py"
This reverts commit bc736df302.
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'
* 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. 这里没有判空。