Automatic Speech Recognition
Transformers
Safetensors
fun_asr_nano
text-generation
speech-recognition
asr
end-to-end
multilingual
streaming
arxiv:2407.04051
Instructions to use FunAudioLLM/Fun-ASR-Nano-2512-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FunAudioLLM/Fun-ASR-Nano-2512-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="FunAudioLLM/Fun-ASR-Nano-2512-hf")# Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("FunAudioLLM/Fun-ASR-Nano-2512-hf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Preserve all transcription context and keywords
Browse files- chat_template.jinja +2 -2
chat_template.jinja
CHANGED
|
@@ -8,8 +8,8 @@ You are a helpful assistant.<|im_end|>
|
|
| 8 |
**上下文信息:**
|
| 9 |
|
| 10 |
|
| 11 |
-
{%
|
| 12 |
-
{%
|
| 13 |
{% endif %}{% endif %}语音转写{% if language_items %}成{{ language_items[0]['language'] }}{% endif %}:{% for content in audio_items %}<|object_ref_start|>{% endfor %}{% else %}{% for content in message['content'] %}{% if content['type'] == 'audio' %}<|object_ref_start|>{% elif content['type'] == 'text' %}{{ content['text'] }}{% endif %}{% endfor %}{% endif %}<|im_end|>
|
| 14 |
{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
|
| 15 |
{% endif %}
|
|
|
|
| 8 |
**上下文信息:**
|
| 9 |
|
| 10 |
|
| 11 |
+
{% for item in text_items %}{{ item['text'] }}
|
| 12 |
+
{% endfor %}{% set keyword_namespace = namespace(items=[]) %}{% for item in keyword_items %}{% set keyword_namespace.items = keyword_namespace.items + item['keywords'] %}{% endfor %}{% if keyword_namespace.items %}热词列表:[{{ keyword_namespace.items | join(', ') }}]
|
| 13 |
{% endif %}{% endif %}语音转写{% if language_items %}成{{ language_items[0]['language'] }}{% endif %}:{% for content in audio_items %}<|object_ref_start|>{% endfor %}{% else %}{% for content in message['content'] %}{% if content['type'] == 'audio' %}<|object_ref_start|>{% elif content['type'] == 'text' %}{{ content['text'] }}{% endif %}{% endfor %}{% endif %}<|im_end|>
|
| 14 |
{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
|
| 15 |
{% endif %}
|