update and fix
This commit is contained in:
12
README.md
12
README.md
@ -7,7 +7,7 @@
|
|||||||
<p>
|
<p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
  🤗 <a href="https://huggingface.co/collections/Qwen/qwen3-asr">Hugging Face</a>   |   🤖 <a href="https://modelscope.cn/collections/Qwen/Qwen3-ASR">ModelScope</a>   |   📑 <a href="https://qwen.ai/blog?id=qwen3asr">Blog</a>   |   📑 <a href="https://github.com/QwenLM/Qwen3-ASR/blob/main/assets/Qwen3_ASR.pdf">Paper</a>  
|
  🤗 <a href="https://huggingface.co/collections/Qwen/qwen3-asr">Hugging Face</a>   |   🤖 <a href="https://modelscope.cn/collections/Qwen/Qwen3-ASR">ModelScope</a>   |   📑 <a href="https://qwen.ai/blog?id=qwen3asr">Blog</a>   |   📑 <a href="https://arxiv.org/abs/2601.21337">Paper</a>  
|
||||||
<br>
|
<br>
|
||||||
🖥️ <a href="https://huggingface.co/spaces/Qwen/Qwen3-ASR">Hugging Face Demo</a>   |    🖥️ <a href="https://modelscope.cn/studios/Qwen/Qwen3-ASR">ModelScope Demo</a>   |   💬 <a href="https://github.com/QwenLM/Qwen/blob/main/assets/wechat.png">WeChat (微信)</a>   |   🫨 <a href="https://discord.gg/CV4E9rpNSD">Discord</a>   |   📑 <a href="https://help.aliyun.com/zh/model-studio/qwen-speech-recognition">API</a>
|
🖥️ <a href="https://huggingface.co/spaces/Qwen/Qwen3-ASR">Hugging Face Demo</a>   |    🖥️ <a href="https://modelscope.cn/studios/Qwen/Qwen3-ASR">ModelScope Demo</a>   |   💬 <a href="https://github.com/QwenLM/Qwen/blob/main/assets/wechat.png">WeChat (微信)</a>   |   🫨 <a href="https://discord.gg/CV4E9rpNSD">Discord</a>   |   📑 <a href="https://help.aliyun.com/zh/model-studio/qwen-speech-recognition">API</a>
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ We release **Qwen3-ASR**, a family that includes two powerful all-in-one speech
|
|||||||
- [Fine Tuning](#fine-tuning)
|
- [Fine Tuning](#fine-tuning)
|
||||||
- [Docker](#docker)
|
- [Docker](#docker)
|
||||||
- [Evaluation](#evaluation)
|
- [Evaluation](#evaluation)
|
||||||
<!-- - [Citation](#citation) -->
|
- [Citation](#citation)
|
||||||
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
@ -1420,18 +1420,18 @@ During evaluation, we ran inference for all models with `dtype=torch.bfloat16` a
|
|||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
<!-- ## Citation
|
## Citation
|
||||||
|
|
||||||
If you find our paper and code useful in your research, please consider giving a star :star: and citation :pencil: :)
|
If you find our paper and code useful in your research, please consider giving a star :star: and citation :pencil: :)
|
||||||
|
|
||||||
```BibTeX
|
```BibTeX
|
||||||
@article{Qwen3-ASR,
|
@article{Qwen3-ASR,
|
||||||
title={Qwen3-ASR Technical Report},
|
title={Qwen3-ASR Technical Report},
|
||||||
author={},
|
author={Xian Shi, Xiong Wang, Zhifang Guo, Yongqi Wang, Pei Zhang, Xinyu Zhang, Zishan Guo, Hongkun Hao, Yu Xi, Baosong Yang, Jin Xu, Jingren Zhou, Junyang Lin},
|
||||||
journal={arXiv preprint arXiv:},
|
journal={arXiv preprint arXiv:2601.21337},
|
||||||
year={2026}
|
year={2026}
|
||||||
}
|
}
|
||||||
``` -->
|
```
|
||||||
|
|
||||||
|
|
||||||
## Star History
|
## Star History
|
||||||
|
|||||||
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "qwen-asr"
|
name = "qwen-asr"
|
||||||
version = "0.0.4"
|
version = "0.0.5"
|
||||||
description = "Qwen-ASR python package"
|
description = "Qwen-ASR python package"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.9"
|
requires-python = ">=3.9"
|
||||||
|
|||||||
@ -733,8 +733,18 @@ class Qwen3ASRModel:
|
|||||||
prefix = ""
|
prefix = ""
|
||||||
else:
|
else:
|
||||||
cur_ids = self.processor.tokenizer.encode(state._raw_decoded)
|
cur_ids = self.processor.tokenizer.encode(state._raw_decoded)
|
||||||
end_idx = max(1, len(cur_ids) - int(state.unfixed_token_num))
|
k = int(state.unfixed_token_num)
|
||||||
prefix = self.processor.tokenizer.decode(cur_ids[:end_idx])
|
while True:
|
||||||
|
end_idx = max(0, len(cur_ids) - k)
|
||||||
|
prefix = self.processor.tokenizer.decode(cur_ids[:end_idx]) if end_idx > 0 else ""
|
||||||
|
try:
|
||||||
|
prefix.encode("utf-8").decode("utf-8")
|
||||||
|
break
|
||||||
|
except UnicodeError:
|
||||||
|
if end_idx == 0:
|
||||||
|
prefix = ""
|
||||||
|
break
|
||||||
|
k += 1
|
||||||
|
|
||||||
prompt = state.prompt_raw + prefix
|
prompt = state.prompt_raw + prefix
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user