Audio-Text-to-Text
Transformers
Safetensors
English
Chinese
moss_transcribe_diarize
text-generation
moss
audio
speech
asr
diarization
timestamp-asr
long-form-audio
multimodal
multilingual
custom_code
Eval Results
Instructions to use OpenMOSS-Team/MOSS-Transcribe-Diarize with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMOSS-Team/MOSS-Transcribe-Diarize with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("OpenMOSS-Team/MOSS-Transcribe-Diarize", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add default chat_template
#24
by itazap HF Staff - opened
- chat_template.jinja +5 -0
chat_template.jinja
CHANGED
|
@@ -2,13 +2,18 @@
|
|
| 2 |
{%- if content is string -%}
|
| 3 |
{{- content -}}
|
| 4 |
{%- else -%}
|
|
|
|
| 5 |
{%- for item in content -%}
|
| 6 |
{%- if item.type == 'audio' or 'audio' in item or 'audio_url' in item -%}
|
| 7 |
{{- '<|audio_start|><|audio_pad|><|audio_end|>\n' -}}
|
| 8 |
{%- elif item.type == 'text' -%}
|
| 9 |
{{- item.text -}}
|
|
|
|
| 10 |
{%- endif -%}
|
| 11 |
{%- endfor -%}
|
|
|
|
|
|
|
|
|
|
| 12 |
{%- endif -%}
|
| 13 |
{%- endmacro -%}
|
| 14 |
{%- if tools %}
|
|
|
|
| 2 |
{%- if content is string -%}
|
| 3 |
{{- content -}}
|
| 4 |
{%- else -%}
|
| 5 |
+
{%- set ns = namespace(has_text=false) -%}
|
| 6 |
{%- for item in content -%}
|
| 7 |
{%- if item.type == 'audio' or 'audio' in item or 'audio_url' in item -%}
|
| 8 |
{{- '<|audio_start|><|audio_pad|><|audio_end|>\n' -}}
|
| 9 |
{%- elif item.type == 'text' -%}
|
| 10 |
{{- item.text -}}
|
| 11 |
+
{%- set ns.has_text = true -%}
|
| 12 |
{%- endif -%}
|
| 13 |
{%- endfor -%}
|
| 14 |
+
{%- if not ns.has_text -%}
|
| 15 |
+
{{- '请将音频转写为文本,每一段需以起始时间戳和说话人编号([S01]、[S02]、[S03]…)开头,正文为对应的语音内容,并在段末标注结束时间戳,以清晰标明该段语音范围。' -}}
|
| 16 |
+
{%- endif -%}
|
| 17 |
{%- endif -%}
|
| 18 |
{%- endmacro -%}
|
| 19 |
{%- if tools %}
|