# VibeVoice ASR

## 概要

VibeVoice ASRは、Microsoftによる自動音声認識モデルです。音響トークナイザーと意味論的オーディオトークナイザーを因果言語モデルと組み合わせることで、堅牢な音声からテキストへの書き起こしを実現します。このモデルは、24kHzでオーディオを処理するVibeVoiceの音響トークナイザーと意味論的トークナイザーを使用し、書き起こしの生成にはQwen2ベースの言語デコーダーを組み合わせます。詳細については、[技術レポート](https://huggingface.co/papers/2601.18184)を参照してください。

モデルのチェックポイントは、[microsoft/VibeVoice-ASR-HF](https://huggingface.co/microsoft/VibeVoice-ASR-HF) で利用可能です。

ハイライト:

- **🕒 60分間のワンパス処理**: 従来のASRモデルは、音声データを短いチャンクに分割して処理するため（多くの場合、グローバルなコンテキストが失われます）、VibeVoice ASRは64Kトークンの長さ内で最大**60分間**の連続音声入力を受け付けます。これにより、1時間全体にわたって一貫した話者追跡と意味の整合性が確保されます。

- **👤 カスタムホットワード**: ユーザーは、認識プロセスを導くためにカスタムホットワード（特定の固有名詞、技術用語、背景情報など）を提供でき、ドメイン固有のコンテンツに対する精度を大幅に向上させることができます。

- **📝 リッチな文字起こし（誰が、いつ、何を言ったか）**: モデルはASR、話者分離、タイムスタンプ付与を同時に実行し、*誰が*、*何を*、*いつ*言ったかを示す構造化された出力を生成します。
  
- **🌍 多言語およびコードスイッチングのサポート**：50以上の言語に対応しており、明示的な言語設定は不要です。また、発話内および発話間のコードスイッチングをネイティブで処理します。

このモデルは[Eric Bezzam](https://huggingface.co/bezzam)によって提供されました。

## 使用方法

このモデルは、さまざまな自動音声認識機能に対応しています。

### 話者付きタイムスタンプ付き文字起こし

VibeVoice ASRの注目すべき機能の一つは、複数話者のコンテンツを文字起こしし、誰がいつ発言したかを特定できる点です。

```python
from transformers import AutoProcessor, VibeVoiceAsrForConditionalGeneration

model_id = "microsoft/VibeVoice-ASR-HF"
processor = AutoProcessor.from_pretrained(model_id)
model = VibeVoiceAsrForConditionalGeneration.from_pretrained(model_id, device_map="auto")
print(f"Model loaded on {model.device} with dtype {model.dtype}")

# Prepare inputs using `apply_transcription_request`
inputs = processor.apply_transcription_request(
    audio="https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/example_output/VibeVoice-1.5B_output.wav",
).to(model.device, model.dtype)

# Apply model
output_ids = model.generate(**inputs)
generated_ids = output_ids[:, inputs["input_ids"].shape[1] :]
transcription = processor.decode(generated_ids)[0]
print("\n" + "=" * 60)
print("RAW OUTPUT")
print("=" * 60)
print(transcription)

transcription = processor.decode(generated_ids, return_format="parsed")[0]
print("\n" + "=" * 60)
print("TRANSCRIPTION (list of dicts)")
print("=" * 60)
for speaker_transcription in transcription:
    print(speaker_transcription)

# Remove speaker labels, only get raw transcription
transcription = processor.decode(generated_ids, return_format="transcription_only")[0]
print("\n" + "=" * 60)
print("TRANSCRIPTION ONLY")
print("=" * 60)
print(transcription)

"""
============================================================
RAW OUTPUT
============================================================
<|im_start|>assistant
[{"Start":0,"End":15.43,"Speaker":0,"Content":"Hello everyone and welcome to the Vibe Voice podcast. I'm your host, Alex, and today we're getting into one of the biggest debates in all of sports: who's the greatest basketball player of all time? I'm so excited to have Sam here to talk about it with me."},{"Start":15.43,"End":21.05,"Speaker":1,"Content":"Thanks so much for having me, Alex. And you're absolutely right. This question always brings out some seriously strong feelings."},{"Start":21.05,"End":31.66,"Speaker":0,"Content":"Okay, so let's get right into it. For me, it has to be Michael Jordan. Six trips to the finals, six championships. That kind of perfection is just incredible."},{"Start":31.66,"End":40.93,"Speaker":1,"Content":"Oh man, the first thing that always pops into my head is that shot against the Cleveland Cavaliers back in '89. Jordan just rises, hangs in the air forever, and just sinks it."}]<|im_end|>
<|endoftext|>

============================================================
TRANSCRIPTION (list of dicts)
============================================================
{'Start': 0, 'End': 15.43, 'Speaker': 0, 'Content': "Hello everyone and welcome to the Vibe Voice podcast. I'm your host, Alex, and today we're getting into one of the biggest debates in all of sports: who's the greatest basketball player of all time? I'm so excited to have Sam here to talk about it with me."}
{'Start': 15.43, 'End': 21.05, 'Speaker': 1, 'Content': "Thanks so much for having me, Alex. And you're absolutely right. This question always brings out some seriously strong feelings."}
{'Start': 21.05, 'End': 31.66, 'Speaker': 0, 'Content': "Okay, so let's get right into it. For me, it has to be Michael Jordan. Six trips to the finals, six championships. That kind of perfection is just incredible."}
{'Start': 31.66, 'End': 40.93, 'Speaker': 1, 'Content': "Oh man, the first thing that always pops into my head is that shot against the Cleveland Cavaliers back in '89. Jordan just rises, hangs in the air forever, and just sinks it."}

============================================================
TRANSCRIPTION ONLY
============================================================
Hello everyone and welcome to the Vibe Voice podcast. I'm your host, Alex, and today we're getting into one of the biggest debates in all of sports: who's the greatest basketball player of all time? I'm so excited to have Sam here to talk about it with me. Thanks so much for having me, Alex. And you're absolutely right. This question always brings out some seriously strong feelings. Okay, so let's get right into it. For me, it has to be Michael Jordan. Six trips to the finals, six championships. That kind of perfection is just incredible. Oh man, the first thing that always pops into my head is that shot against the Cleveland Cavaliers back in '89. Jordan just rises, hangs in the air forever, and just sinks it.
"""
```

VibeVoice ASR モデルは、JSON 構造に似た文字列を生成するように学習されています。`return_format="parsed"` フラグは、生成された出力を dict のリストとして返そうとしますが、`return_format="transcription_only"` は、書き起こされた音声のみを抽出しようとします。いずれも失敗した場合、生成された出力はそのまま返されます。

### コンテキストの提供

コンテキストを指定することも可能です。固有名詞のように、正しく文字起こしできない単語がある場合に便利です。

以下では、話者（ドイツ訛り）が「About VibeVoice」というコンテキストの有無を比較しながら VibeVoice について語る音声を書き起こしています。

```python
from transformers import AutoProcessor, VibeVoiceAsrForConditionalGeneration

model_id = "microsoft/VibeVoice-ASR-HF"
processor = AutoProcessor.from_pretrained(model_id)
model = VibeVoiceAsrForConditionalGeneration.from_pretrained(model_id, device_map="auto")
print(f"Model loaded on {model.device} with dtype {model.dtype}")

# Without context
inputs = processor.apply_transcription_request(
    audio="https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/realtime_model/vibevoice_tts_german.wav",
).to(model.device, model.dtype)
output_ids = model.generate(**inputs)
generated_ids = output_ids[:, inputs["input_ids"].shape[1] :]
transcription = processor.decode(generated_ids, return_format="transcription_only")[0]
print(f"WITHOUT CONTEXT: {transcription}")

# With context
inputs = processor.apply_transcription_request(
    audio="https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/realtime_model/vibevoice_tts_german.wav",
    prompt="About VibeVoice",
).to(model.device, model.dtype)
output_ids = model.generate(**inputs)
generated_ids = output_ids[:, inputs["input_ids"].shape[1] :]
transcription = processor.decode(generated_ids, return_format="transcription_only")[0]
print(f"WITH CONTEXT   : {transcription}")

"""
WITHOUT CONTEXT: Revevoices is a novel framework designed for generating expressive, long-form, multi-speaker conversational audio.
WITH CONTEXT   : VibeVoice is this novel framework designed for generating expressive, long-form, multi-speaker, conversational audio.
"""
```

### バッチ推論

オーディオのリストを渡すことで、バッチ推論が可能です。プロンプトが提供されている場合は、プロンプトのリストも渡します。オーディオ入力とプロンプトの数は一致させる必要があります（プロンプトについては、特定のオーディオに対して不要な場合は、そのエントリを`None`に設定できます）。

```python
from transformers import AutoProcessor, VibeVoiceAsrForConditionalGeneration

model_id = "microsoft/VibeVoice-ASR-HF"
audio = [
    "https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/realtime_model/vibevoice_tts_german.wav",
    "https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/example_output/VibeVoice-1.5B_output.wav"
]
prompts = ["About VibeVoice", None]

processor = AutoProcessor.from_pretrained(model_id)
model = VibeVoiceAsrForConditionalGeneration.from_pretrained(model_id, device_map="auto")
print(f"Model loaded on {model.device} with dtype {model.dtype}")

inputs = processor.apply_transcription_request(audio, prompt=prompts).to(model.device, model.dtype)
output_ids = model.generate(**inputs)
generated_ids = output_ids[:, inputs["input_ids"].shape[1] :]
transcription = processor.decode(generated_ids, return_format="transcription_only")

print(transcription)
```

### トークナイザのチャンクを調整する（メモリ不足の場合など）

VibeVoice ASRの重要な機能の一つは、最大60分間の連続音声を書き起こせることです。これは、音声を60秒のセグメント（24kHzで1440000サンプル）に分割し、各セグメント間で畳み込み状態をキャッシュすることで実現されています。

ただし、60秒のチャンクがデバイスに対して大きすぎる場合は、`generate`に渡す`acoustic_tokenizer_chunk_size`引数を調整できます。*ホップ長（元のacoustic tokenizerでは3200）の倍数である必要があります。*

```python
from transformers import AutoProcessor, VibeVoiceAsrForConditionalGeneration

acoustic_tokenizer_chunk_size = 64000    # default is 1440000 (60s @ 24kHz)
model_id = "microsoft/VibeVoice-ASR-HF"
audio = [
    "https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/realtime_model/vibevoice_tts_german.wav",
    "https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/example_output/VibeVoice-1.5B_output.wav"
]
prompts = ["About VibeVoice", None]

processor = AutoProcessor.from_pretrained(model_id)
model = VibeVoiceAsrForConditionalGeneration.from_pretrained(model_id, device_map="auto")
print(f"Model loaded on {model.device} with dtype {model.dtype}")

inputs = processor.apply_transcription_request(audio, prompt=prompts).to(model.device, model.dtype)
output_ids = model.generate(**inputs, acoustic_tokenizer_chunk_size=acoustic_tokenizer_chunk_size)
generated_ids = output_ids[:, inputs["input_ids"].shape[1] :]
transcription = processor.decode(generated_ids, return_format="transcription_only")
print(transcription)
```

### チャットテンプレート

VibeVoice ASR はチャットテンプレートの入力も受け入れます(`apply_transcription_request` は便宜上、`apply_chat_template` のラッパーです):
```python
from transformers import AutoProcessor, VibeVoiceAsrForConditionalGeneration

model_id = "microsoft/VibeVoice-ASR-HF"
processor = AutoProcessor.from_pretrained(model_id)
model = VibeVoiceAsrForConditionalGeneration.from_pretrained(model_id, device_map="auto")

chat_template = [
    [
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "About VibeVoice"},
                {
                    "type": "audio",
                    "path": "https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/realtime_model/vibevoice_tts_german.wav",
                },
            ],
        }
    ],
    [
        {
            "role": "user",
            "content": [
                {
                    "type": "audio",
                    "path": "https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/example_output/VibeVoice-1.5B_output.wav",
                },
            ],
        }
    ],
]

inputs = processor.apply_chat_template(
    chat_template,
    tokenize=True,
    return_dict=True,
).to(model.device, model.dtype)

output_ids = model.generate(**inputs)
generated_ids = output_ids[:, inputs["input_ids"].shape[1] :]
transcription = processor.decode(generated_ids, return_format="transcription_only")
print(transcription)
```

### トレーニング

VibeVoice ASRは、モデルが出力する損失で学習できます。

```python
from transformers import AutoProcessor, VibeVoiceAsrForConditionalGeneration

model_id = "microsoft/VibeVoice-ASR-HF"
processor = AutoProcessor.from_pretrained(model_id)
model = VibeVoiceAsrForConditionalGeneration.from_pretrained(model_id, device_map="auto")
model.train()

# Prepare batch of 2
# -- NOTE: the original model is trained to output transcription, speaker ID, and timestamps in JSON-like format. Below we are only using the transcription text as the label
chat_template = [
    [
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "VibeVoice is this novel framework designed for generating expressive, long-form, multi-speaker, conversational audio."},
                {
                    "type": "audio",
                    "path": "https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/realtime_model/vibevoice_tts_german.wav",
                },
            ],
        }
    ],
    [
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Hello everyone and welcome to the VibeVoice podcast. I'm your host, Alex, and today we're getting into one of the biggest debates in all of sports: who's the greatest basketball player of all time? I'm so excited to have Sam here to talk about it with me. Thanks so much for having me, Alex. And you're absolutely right. This question always brings out some seriously strong feelings. Okay, so let's get right into it. For me, it has to be Michael Jordan. Six trips to the finals, six championships. That kind of perfection is just incredible. Oh man, the first thing that always pops into my head is that shot against the Cleveland Cavaliers back in '89. Jordan just rises, hangs in the air forever, and just sinks it."},
                {
                    "type": "audio",
                    "path": "https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/example_output/VibeVoice-1.5B_output.wav",
                },
            ],
        }
    ],
]
inputs = processor.apply_chat_template(
    chat_template,
    tokenize=True,
    return_dict=True,
    output_labels=True,
).to(model.device, model.dtype)

loss = model(**inputs).loss
print("Loss:", loss.item())
loss.backward()
```

### Torch compile

モデルは、より高速な推論/学習のためにコンパイルできます。
```python
import time

import torch

from transformers import AutoProcessor, VibeVoiceAsrForConditionalGeneration

model_id = "microsoft/VibeVoice-ASR-HF"

num_warmup = 5
num_runs = 20

# Load processor + model
processor = AutoProcessor.from_pretrained(model_id)
model = VibeVoiceAsrForConditionalGeneration.from_pretrained(model_id, device_map="auto")

# Prepare static inputs
chat_template = [
    [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "VibeVoice is this novel framework designed for generating expressive, long-form, multi-speaker, conversational audio.",
                },
                {
                    "type": "audio",
                    "path": "https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/realtime_model/vibevoice_tts_german.wav",
                },
            ],
        }
    ],
] * 4  # batch size 4
inputs = processor.apply_chat_template(
    chat_template,
    tokenize=True,
    return_dict=True,
).to(model.device, torch.bfloat16)

# Benchmark without compile
print("Warming up without compile...")
with torch.no_grad():
    for _ in range(num_warmup):
        _ = model(**inputs)

torch.accelerator.synchronize()

print("\nBenchmarking without torch.compile...")
torch.accelerator.synchronize()
start = time.time()
with torch.no_grad():
    for _ in range(num_runs):
        _ = model(**inputs)
torch.accelerator.synchronize()
no_compile_time = (time.time() - start) / num_runs
print(f"Average time without compile: {no_compile_time:.4f}s")

# Benchmark with compile
print("\nCompiling model...")
model = torch.compile(model)

print("Warming up with compile (includes graph capture)...")
with torch.no_grad():
    for _ in range(num_warmup):
        _ = model(**inputs)

torch.accelerator.synchronize()

print("\nBenchmarking with torch.compile...")
torch.accelerator.synchronize()
start = time.time()
with torch.no_grad():
    for _ in range(num_runs):
        _ = model(**inputs)
torch.accelerator.synchronize()
compile_time = (time.time() - start) / num_runs
print(f"Average time with compile: {compile_time:.4f}s")

speedup = no_compile_time / compile_time
print(f"\nSpeedup: {speedup:.2f}x")
```

### Pipelineの使用方法

モデルはパイプラインとして使用できますが、生出力の解析には独自のメソッドを定義する必要があります。

```python
from transformers import pipeline

model_id = "microsoft/VibeVoice-ASR-HF"
pipe = pipeline("any-to-any", model=model_id, device_map="auto")
chat_template = [
    {
        "role": "user",
        "content": [
            {"type": "text", "text": "About VibeVoice"},
            {
                "type": "audio",
                "path": "https://huggingface.co/datasets/bezzam/vibevoice_samples/resolve/main/realtime_model/vibevoice_tts_german.wav",
            },
        ],
    }
]
outputs = pipe(text=chat_template, return_full_text=False)

print("\n" + "=" * 60)
print("RAW PIPELINE OUTPUT")
print("=" * 60)
print(outputs[0]["generated_text"])

print("\n" + "=" * 60)
print("DICT OUTPUT")
print("=" * 60)
dict_output = pipe.processor.extract_speaker_dict(outputs[0]["generated_text"])
print(dict_output)

print("\n" + "=" * 60)
print("TRANSCRIPT OUTPUT")
print("=" * 60)
transcription = pipe.processor.extract_transcription(outputs[0]["generated_text"])
print(transcription)
```

## VibeVoiceAsrConfig[[transformers.VibeVoiceAsrConfig]]

#### transformers.VibeVoiceAsrConfig[[transformers.VibeVoiceAsrConfig]]

```python
transformers.VibeVoiceAsrConfig(transformers_version: str | None = None, architectures: list[str] | None = None, output_hidden_states: bool | None = False, return_dict: bool | None = True, dtype: str | torch.dtype | None = None, chunk_size_feed_forward: int = 0, is_encoder_decoder: bool = False, id2label: dict[int, str] | dict[str, str] | None = None, label2id: dict[str, int] | dict[str, str] | None = None, problem_type: Literal['regression', 'single_label_classification', 'multi_label_classification'] | None = None, acoustic_tokenizer_encoder_config: dict | transformers.configuration_utils.PreTrainedConfig | None = None, semantic_tokenizer_encoder_config: dict | transformers.configuration_utils.PreTrainedConfig | None = None, text_config: dict | transformers.configuration_utils.PreTrainedConfig | None = None, audio_token_id: int = 151648, audio_bos_token_id: int = 151646, audio_eos_token_id: int = 151647, acoustic_tokenizer_chunk_size: int = 1440000)
```

[ソース](https://github.com/huggingface/transformers/blob/main/src/transformers/models/vibevoice_asr/configuration_vibevoice_asr.py#L31)

**パラメータ:**

acoustic_tokenizer_encoder_config (`Union[VibeVoiceAcousticTokenizerConfig, dict]`, *optional*) : 音響トークナイザーの設定オブジェクトまたは辞書です。このトークナイザーは、音声から音響特徴を抽出します。

semantic_tokenizer_encoder_config (`Union[VibeVoiceAcousticTokenizerConfig, dict]`、*optional*) : セマンティック トークナイザーの設定オブジェクトまたは辞書です。このトークナイザーは、音声からセマンティックな特徴を抽出します。

text_config (`Union[dict, ~configuration_utils.PreTrainedConfig]`, *任意*) : テキストバックボーンの config オブジェクトまたは辞書。

audio_token_id (`int`、*任意*、デフォルトは`151648`) : 入力音声のプレースホルダーとして使用されるオーディオトークンのインデックス。

audio_bos_token_id (`int`、*optional*、デフォルトは 151646) : 音声のシーケンス開始トークンのインデックス。

audio_eos_token_id (`int`、*optional*、デフォルトは 151647) : 音声のシーケンス終了トークンのインデックス。

acoustic_tokenizer_chunk_size (`int`、*optional*、デフォルトは 1440000) : トークナイザがオーディオ入力を処理する際に使用するチャンクサイズ（サンプル数）。デフォルト値は 24kHz での 60 秒に相当します。

これは、VibeVoiceAsrModel の設定を保存するための設定クラスです。指定された引数に基づいて Vibevoice Asr モデルをインスタンス化し、モデルのアーキテクチャを定義するために使用されます。デフォルト値で設定をインスタンス化すると、[microsoft/VibeVoice-ASR-HF](https://huggingface.co/microsoft/VibeVoice-ASR-HF) と同様の設定が得られます。

設定オブジェクトは [PreTrainedConfig](/docs/transformers/main/ja/main_classes/configuration#transformers.PreTrainedConfig) を継承し、モデルの出力を制御するために使用できます。詳細については、[PreTrainedConfig](/docs/transformers/main/ja/main_classes/configuration#transformers.PreTrainedConfig) のドキュメントを参照してください。

例:

```python
>>> from transformers import VibeVoiceAsrForConditionalGeneration, VibeVoiceAsrConfig, VibeVoiceAcousticTokenizerEncoderConfig, Qwen2Config

>>> # Initializing VibeVoice acoustic and semantic encoder configs
>>> acoustic_config = VibeVoiceAcousticTokenizerEncoderConfig()
>>> semantic_config = VibeVoiceAcousticTokenizerEncoderConfig(hidden_size=128)

>>> # Initializing a Qwen2 config
>>> text_config = Qwen2Config()

>>> # Initializing a VibeVoice ASR configuration
>>> configuration = VibeVoiceAsrConfig(acoustic_config, semantic_config, text_config)

>>> # Initializing a model from the vibevoice_asr style configuration
>>> model = VibeVoiceAsrForConditionalGeneration(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```

## VibeVoiceAsrProcessor[[transformers.VibeVoiceAsrProcessor]]

#### transformers.VibeVoiceAsrProcessor[[transformers.VibeVoiceAsrProcessor]]

```python
transformers.VibeVoiceAsrProcessor(feature_extractor, tokenizer, chat_template = None, audio_token = '<|box_start|>', audio_bos_token = '<|object_ref_start|>', audio_eos_token = '<|object_ref_end|>', audio_duration_token = '<|AUDIO_DURATION|>')
```

[ソース](https://github.com/huggingface/transformers/blob/main/src/transformers/models/vibevoice_asr/processing_vibevoice_asr.py#L48)

**パラメータ:**

feature_extractor (`VibeVoiceAcousticTokenizerFeatureExtractor`) : 音声処理用のフィーチャーエクストラクター。

tokenizer (`Qwen2TokenizerFast`) : テキスト処理用のトークナイザー。

chat_template (`str`, *任意*) : チャット内のメッセージのリストをトークン化可能な文字列に変換するために使用される Jinja テンプレート。

audio_token (`str`、*任意*、デフォルトは`"<|box_start|>"`) : チャットテンプレートで使用するオーディオトークンのプレースホルダー。

audio_bos_token (`str`、*任意*、デフォルトは`"<|object_ref_start|>"`) : チャットテンプレートで使用する、音声のシーケンス開始トークンのプレースホルダー。

audio_eos_token (`str`、*任意*、デフォルトは`"<|object_ref_end|>"`) : チャットテンプレートで使用する、音声のシーケンス終了トークンのプレースホルダー。

audio_duration_token (`str`、*任意*、デフォルトは`"<|AUDIO_DURATION|>"`) : チャットテンプレートで使用するオーディオの長さのトークンプレースホルダー。

[VibeVoiceAcousticTokenizerFeatureExtractor](/docs/transformers/main/ja/model_doc/vibevoice_acoustic_tokenizer#transformers.VibeVoiceAcousticTokenizerFeatureExtractor)と[Qwen2TokenizerFast](/docs/transformers/main/ja/model_doc/qwen2#transformers.Qwen2Tokenizer)を単一のプロセッサにラップし、音声特徴抽出とトークナイザの両方の機能を受け継ぐVibeVoice ASRプロセッサを構築します。

詳細については、[__call__()](/docs/transformers/main/ja/model_doc/vibevoice_asr#transformers.VibeVoiceAsrProcessor.__call__)を参照してください。

#### __call__[[transformers.VibeVoiceAsrProcessor.__call__]]

```python
__call__(text: str | list[str], audio: typing.Union[numpy.ndarray, ForwardRef('torch.Tensor'), collections.abc.Sequence[numpy.ndarray], collections.abc.Sequence['torch.Tensor'], NoneType] = None, output_labels: bool | None = False, **kwargs: *<class 'transformers.models.vibevoice_asr.processing_vibevoice_asr.VibeVoiceAsrProcessorKwargs'>)
```

[ソース](https://github.com/huggingface/transformers/blob/main/src/transformers/models/vibevoice_asr/processing_vibevoice_asr.py#L94)

**パラメータ:**

text (`Union[str, list[str]]`) : エンコード対象のシーケンス、またはシーケンスのバッチです。各シーケンスは文字列、または文字列のリスト（プレトークナイズ済み文字列）であることができます。プレトークナイズ済み入力を渡す場合は、バッチ入力との曖昧さを避けるために`is_split_into_words=True`を設定してください。

audio (`Union[numpy.ndarray, torch.Tensor, collections.abc.Sequence[numpy.ndarray], collections.abc.Sequence[torch.Tensor]]`, *任意*) : 準備対象のオーディオまたはオーディオのバッチです。各オーディオは NumPy 配列または PyTorch テンソルであることができます。NumPy 配列/PyTorch テンソルの場合、各オーディオの形状は (C, T) である必要があります。ここで C はチャネル数、T はオーディオのサンプル長を表します。

output_labels (`bool`、*任意*、デフォルト: False) : 学習用のラベルを返すかどうか。

return_tensors (`str` または [TensorType](/docs/transformers/main/ja/internal/file_utils#transformers.TensorType)、*optional*) : 設定されている場合、特定のフレームワークのテンソルを返します。受け入れ可能な値は以下の通りです:  - `'pt'`: PyTorch の `torch.Tensor` オブジェクトを返します。 - `'np'`: NumPy の `np.ndarray` オブジェクトを返します。

- ****kwargs** ([ProcessingKwargs](/docs/transformers/main/ja/main_classes/processors#transformers.ProcessingKwargs), *optional*) : 各モダリティ（テキスト、画像、動画、音声）の追加処理オプション。モデル固有のパラメータは上記にリストされています。サポートされている引数の完全なリストについては、TypedDict クラスを参照してください。

**戻り値:** [BatchFeature](/docs/transformers/main/ja/main_classes/feature_extractor#transformers.BatchFeature)

トークン化されたテキスト（`input_ids`、`attention_mask`）と音声特徴（`input_values`、`padding_mask`）を含む辞書です。

#### apply_transcription_request[[transformers.VibeVoiceAsrProcessor.apply_transcription_request]]

```python
apply_transcription_request(audio: typing.Union[str, list[str], numpy.ndarray, ForwardRef('torch.Tensor'), collections.abc.Sequence[numpy.ndarray], collections.abc.Sequence['torch.Tensor']], prompt: str | list[str] | None = None, tokenize: bool = True, **kwargs: *<class 'transformers.models.vibevoice_asr.processing_vibevoice_asr.VibeVoiceAsrProcessorKwargs'>)
```

[ソース](https://github.com/huggingface/transformers/blob/main/src/transformers/models/vibevoice_asr/processing_vibevoice_asr.py#L177)

**パラメータ:**

audio (`str`、`list[str]`、`np.ndarray`、`torch.Tensor`、`list[np.ndarray]`、`list[torch.Tensor]`) : 文字起こし対象の音声。文字列はローカルパスまたは URL として解釈され、チャットテンプレートローダーによって自動的に読み込まれます。NumPy 配列および PyTorch テンソルはそのまま転送されます。

prompt (`str` または `list[str]`、*任意*) : ユーザーターンに追加のコンテキストとして含めるカスタムプロンプトです。リストの場合、バッチの長さと一致する必要があります。`None` の場合、追加のコンテキストは提供されません。

tokenize (`bool`、*任意*、デフォルトは `True`) : プロンプトのトークナイズとオーディオの処理を行うかどうかを指定します。`False` の場合、オーディオは読み込まれず、プロンプトは展開されていないオーディオプレースホルダーを含む文字列として返されます。これらをオーディオとともにプロセッサーに渡す `processor(text=prompts, audio=audio)` 場合、`tokenize=True` と同じ出力が得られます。

- ****kwargs** : [apply_chat_template()](/docs/transformers/main/ja/main_classes/processors#transformers.ProcessorMixin.apply_chat_template) に転送される追加のキーワード引数（例: `text_kwargs`、`audio_kwargs` など）。

**戻り値:** [BatchFeature](/docs/transformers/main/ja/main_classes/feature_extractor#transformers.BatchFeature) または `list[str]`

`tokenize=False` の場合は 1 つのオーディオにつき 1 つのプロンプト、それ以外の場合は [VibeVoiceAsrForConditionalGeneration.generate()](/docs/transformers/main/ja/main_classes/text_generation#transformers.GenerationMixin.generate) に渡せる状態の出力が返されます。

手動でチャットテンプレートを書かずに、自動音声認識用の入力を準備します。

#### decode[[transformers.VibeVoiceAsrProcessor.decode]]

```python
decode(*args, return_format = 'raw', **kwargs)
```

[ソース](https://github.com/huggingface/transformers/blob/main/src/transformers/models/vibevoice_asr/processing_vibevoice_asr.py#L233)

**パラメータ:**

return_format (`str`、*任意*、デフォルトは`"raw"`) : 選択肢は以下の通りです。 - `"raw"`: トークナイザーから解析なしで生デコード文字列のリストを返します。 - `"parsed"`: 各話者の発話ごとにタイムスタンプ付きの解析済み辞書オブジェクトのリストのリストを返します。 - `"transcription_only"`: 抽出された文字起こし文字列のリストを返します。 `skip_special_tokens` は、`"parsed"` および `"transcription_only"` の場合、自動的に`True`に設定（ハードセット）されます。

[decode()](/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode) に引数を転送し、必要に応じて dict 形式の出力を解析します。

VibeVoice ASR は、辞書のような形式で文字起こしを出力します。例:
```
[
    'assistant
":0.0,"End":7.56,"Speaker":0,"Content":"text"}]

    'assistant
":0,"End":5.20,"Speaker":0,"Content":"text"}]

]
```

## VibeVoiceAsrModel[[transformers.VibeVoiceAsrModel]]

#### transformers.VibeVoiceAsrModel[[transformers.VibeVoiceAsrModel]]

```python
transformers.VibeVoiceAsrModel(config: VibeVoiceAsrConfig)
```

[ソース](https://github.com/huggingface/transformers/blob/main/src/transformers/models/vibevoice_asr/modeling_vibevoice_asr.py#L304)

**パラメータ:**

config ([VibeVoiceAsrConfig](/docs/transformers/main/ja/model_doc/vibevoice_asr#transformers.VibeVoiceAsrConfig)) : モデルのパラメータをすべて含むモデル設定クラスです。設定ファイルで初期化しても、モデルに関連する重みは読み込まれず、設定のみが読み込まれます。モデルの重みをロードするには、[from_pretrained()](/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained) メソッドを確認してください。

言語モデリングヘッドを備えない VibeVoice ASR モデル（音響トークナイザー + 意味トークナイザー + マルチモーダルプロジェクター + 言語モデル）。

このモデルは [PreTrainedModel](/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel) を継承しています。ライブラリがすべてのモデルに対して実装している汎用的なメソッド（ダウンロードや保存、入力埋め込みのリサイズ、ヘッドのプルーニングなど）については、スーパークラスのドキュメントを参照してください。

このモデルは、PyTorchの[torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module)のサブクラスでもあります。通常のPyTorch Moduleとして使用し、一般的な使用方法や動作に関する詳細については、PyTorchのドキュメントを参照してください。

#### forward[[transformers.VibeVoiceAsrModel.forward]]

```python
forward(input_ids: typing.Optional[torch.LongTensor] = None, attention_mask: typing.Optional[torch.Tensor] = None, past_key_values: transformers.cache_utils.Cache | None = None, inputs_embeds: typing.Optional[torch.Tensor] = None, input_values: typing.Optional[torch.Tensor] = None, padding_mask: typing.Optional[torch.BoolTensor] = None, sample: bool = True, **kwargs: *<class 'transformers.utils.generic.TransformersKwargs'>)
```

[ソース](https://github.com/huggingface/transformers/blob/main/src/transformers/models/vibevoice_asr/modeling_vibevoice_asr.py#L379)

**パラメータ:**

input_ids (`torch.LongTensor`、shape `(batch_size, sequence_length)`、*任意*) : 語彙における入力シーケンスのトークンインデックスです。デフォルトでは、パディングは無視されます。インデックスは [AutoTokenizer](/docs/transformers/main/ja/model_doc/auto#transformers.AutoTokenizer) を使用して取得できます。詳細については、[PreTrainedTokenizer.encode()](/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode) および [PreTrainedTokenizer.__call__()](/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__) を参照してください。 [入力IDとは何ですか？](../glossary#input-ids)

attention_mask (`torch.Tensor`、shape `(batch_size, sequence_length)`、*任意*) : padding トークンのインデックスに対する attention を回避するためのマスクです。マスクの値は `[0, 1]` から選択されます:  - **マスクされない**トークンは 1、- **マスクされる**トークンは 0。  [attention マスクとは?](../glossary#attention-mask)

past_key_values (`~cache_utils.Cache`, *任意*) : 逐次デコードを高速化するために使用できる、事前計算された hidden-states（self-attention ブロックおよび cross-attention ブロック内の key と value）です。通常、`use_cache=True` または `config.use_cache=True` の場合、モデルがデコードの以前の段階で返した `past_key_values` で構成されます。入力として許可されるのは [Cache](/docs/transformers/main/ja/internal/generation_utils#transformers.Cache) インスタンスのみです。[kv cache ガイド](https://huggingface.co/docs/transformers/en/kv_cache)を参照してください。`past_key_values` が渡されない場合、デフォルトで [DynamicCache](/docs/transformers/main/ja/internal/generation_utils#transformers.DynamicCache) が初期化されます。モデルは、入力として与えられたのと同じキャッシュ形式を出力します。`past_key_values` を使用する場合は、すべての `input_ids`（形状 `(batch_size, sequence_length)`）の代わりに、このモデルに過去の key value 状態が与えられていない未処理の `input_ids`（形状 `(batch_size, unprocessed_length)`）のみを入力する必要があります。

inputs_embeds (`torch.Tensor`、shape `(batch_size, sequence_length, hidden_size)`、*任意*) : `input_ids` を渡す代わりに、埋め込み表現を直接渡すこともできます。これは、モデル内部の埋め込み参照行列よりも、`input_ids` のインデックスを対応するベクトルに変換する方法をより細かく制御したい場合に有用です。

input_values (`torch.Tensor`、shape `(batch_size, sequence_length)`、*任意*) : 入力生の音声波形の浮動小数点数値。値は、`.flac` または `.wav` 形式のオーディオファイルを `list[float]`、`numpy.ndarray`、または `torch.Tensor` 型の配列として読み込むことで取得できます。*例えば*、torchcodec ライブラリ（`pip install torchcodec`）や soundfile ライブラリ（`pip install soundfile`）を通じて行います。`input_values` として配列を準備するには、パディングと `torch.Tensor` 型への変換のために [AutoProcessor](/docs/transformers/main/ja/model_doc/auto#transformers.AutoProcessor) を使用してください。詳細は [VibeVoiceAsrProcessor.__call__()](/docs/transformers/main/ja/model_doc/vibevoice_asr#transformers.VibeVoiceAsrProcessor.__call__) を参照してください。

padding_mask (`torch.BoolTensor`、形状 `(batch_size, sequence_length)`、*任意*) : パディングの機能インデックスに対する操作の実行を回避するためのマスク。

sample (`bool`、*任意*、デフォルトは`True`) : 元のモデルと同様に、音響潜在変数にガウスノイズを追加するかどうか（σ-VAE: ノイズのスケールはバッチ項目ごとに N(0, `vae_std`) からサンプリングされる）。False の場合、エンコーダーの出力がそのまま使用されるため、出力は決定論的になります。

**戻り値:** `VibeVoiceAsrModelOutputWithPast` または `tuple(torch.Tensor)`

`VibeVoiceAsrModelOutputWithPast` または、`return_dict=False` が渡された場合、または `config.return_dict=False` の場合、`torch.Tensor` のタプル。構成（[VibeVoiceAsrConfig](/docs/transformers/main/ja/model_doc/vibevoice_asr#transformers.VibeVoiceAsrConfig)）や入力に応じて、さまざまな要素で構成されます。

[VibeVoiceAsrModel](/docs/transformers/main/ja/model_doc/vibevoice_asr#transformers.VibeVoiceAsrModel)のforwardメソッドは、`__call__`特殊メソッドをオーバーライドします。

この関数内でフォワードパスの手順を定義する必要がありますが、その後、この関数ではなく`Module`インスタンスを呼び出すべきです。前者は前処理と後処理の実行を適切に処理するのに対し、後者はそれらを無視してしまいます。

- **last_hidden_state** (`torch.Tensor`、形状 `(batch_size, sequence_length, hidden_size)`) -- モデルの最終層の出力における隠れ状態のシーケンス。

  `past_key_values`が使用されている場合、出力されるのは、形状`(batch_size, 1, hidden_size)`のシーケンスの最後の隠れ状態のみです。
- **past_key_values** (`Cache`、*任意*、`use_cache=True` が渡された場合または `config.use_cache=True` の場合に返されます) -- [Cache](/docs/transformers/main/ja/internal/generation_utils#transformers.Cache) のインスタンスです。
- **hidden_states** (`tuple(torch.Tensor)`、*optional*、`output_hidden_states=True` が渡された場合または `config.output_hidden_states=True` の場合に返されます) -- `torch.Tensor` のタプル（モデルに埋め込み層がある場合はその出力用 1 つ、各層の出力用 1 つずつ）で、形状は `(batch_size, sequence_length, hidden_size)` です。

  各層の出力におけるモデルのHidden-states、および任意の初期埋め込み出力。
- **attentions** (`tuple(torch.Tensor)`、*optional*、`output_attentions=True` が渡された場合または `config.output_attentions=True` の場合に返されます) -- `torch.Tensor` のタプル（各レイヤーごとに1つ）、形状は `(batch_size, num_heads, sequence_length, sequence_length)`。

  アテンションのsoftmax後のアテンション重み。自己アテンションヘッド内で加重平均を計算するために使用されます。
- **audio_hidden_states** (`torch.Tensor`、*任意*) -- 投影されたオーディオの隠れ状態。

## VibeVoiceAsrForConditionalGeneration[[transformers.VibeVoiceAsrForConditionalGeneration]]

#### transformers.VibeVoiceAsrForConditionalGeneration[[transformers.VibeVoiceAsrForConditionalGeneration]]

```python
transformers.VibeVoiceAsrForConditionalGeneration(config: VibeVoiceAsrConfig)
```

[ソース](https://github.com/huggingface/transformers/blob/main/src/transformers/models/vibevoice_asr/modeling_vibevoice_asr.py#L435)

**パラメータ:**

config ([VibeVoiceAsrConfig](/docs/transformers/main/ja/model_doc/vibevoice_asr#transformers.VibeVoiceAsrConfig)) : モデルのパラメータをすべて含むモデル設定クラスです。設定ファイルで初期化しても、モデルに関連する重みは読み込まれず、設定のみが読み込まれます。モデルの重みをロードするには、[from_pretrained()](/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained) メソッドを確認してください。

事前学習済みの音響トークナイザーと言語モデルを備えたVibeVoice ASRモデル。

このモデルは [PreTrainedModel](/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel) を継承しています。ライブラリがすべてのモデルに対して実装している汎用的なメソッド（ダウンロードや保存、入力埋め込みのリサイズ、ヘッドのプルーニングなど）については、スーパークラスのドキュメントを参照してください。

このモデルは、PyTorchの[torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module)のサブクラスでもあります。通常のPyTorch Moduleとして使用し、一般的な使用方法や動作に関する詳細については、PyTorchのドキュメントを参照してください。

#### forward[[transformers.VibeVoiceAsrForConditionalGeneration.forward]]

```python
forward(input_ids: typing.Optional[torch.LongTensor] = None, attention_mask: typing.Optional[torch.Tensor] = None, past_key_values: transformers.cache_utils.Cache | None = None, inputs_embeds: typing.Optional[torch.Tensor] = None, input_values: typing.Optional[torch.Tensor] = None, padding_mask: typing.Optional[torch.BoolTensor] = None, labels: typing.Optional[torch.LongTensor] = None, logits_to_keep: typing.Union[int, torch.Tensor] = 0, sample: bool = True, **kwargs: *<class 'transformers.utils.generic.TransformersKwargs'>)
```

[ソース](https://github.com/huggingface/transformers/blob/main/src/transformers/models/vibevoice_asr/modeling_vibevoice_asr.py#L445)

**パラメータ:**

input_ids (`torch.LongTensor`、shape `(batch_size, sequence_length)`、*任意*) : 語彙における入力シーケンスのトークンインデックスです。デフォルトでは、パディングは無視されます。インデックスは [AutoTokenizer](/docs/transformers/main/ja/model_doc/auto#transformers.AutoTokenizer) を使用して取得できます。詳細については、[PreTrainedTokenizer.encode()](/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode) および [PreTrainedTokenizer.__call__()](/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__) を参照してください。 [入力IDとは何ですか？](../glossary#input-ids)

attention_mask (`torch.Tensor`、shape `(batch_size, sequence_length)`、*任意*) : padding トークンのインデックスに対する attention を回避するためのマスクです。マスクの値は `[0, 1]` から選択されます:  - **マスクされない**トークンは 1、- **マスクされる**トークンは 0。  [attention マスクとは?](../glossary#attention-mask)

past_key_values (`~cache_utils.Cache`, *任意*) : 逐次デコードを高速化するために使用できる、事前計算された hidden-states（self-attention ブロックおよび cross-attention ブロック内の key と value）です。通常、`use_cache=True` または `config.use_cache=True` の場合、モデルがデコードの以前の段階で返した `past_key_values` で構成されます。入力として許可されるのは [Cache](/docs/transformers/main/ja/internal/generation_utils#transformers.Cache) インスタンスのみです。[kv cache ガイド](https://huggingface.co/docs/transformers/en/kv_cache)を参照してください。`past_key_values` が渡されない場合、デフォルトで [DynamicCache](/docs/transformers/main/ja/internal/generation_utils#transformers.DynamicCache) が初期化されます。モデルは、入力として与えられたのと同じキャッシュ形式を出力します。`past_key_values` を使用する場合は、すべての `input_ids`（形状 `(batch_size, sequence_length)`）の代わりに、このモデルに過去の key value 状態が与えられていない未処理の `input_ids`（形状 `(batch_size, unprocessed_length)`）のみを入力する必要があります。

inputs_embeds (`torch.Tensor`、shape `(batch_size, sequence_length, hidden_size)`、*任意*) : `input_ids` を渡す代わりに、埋め込み表現を直接渡すこともできます。これは、モデル内部の埋め込み参照行列よりも、`input_ids` のインデックスを対応するベクトルに変換する方法をより細かく制御したい場合に有用です。

input_values (`torch.Tensor`、shape `(batch_size, sequence_length)`、*任意*) : 入力生の音声波形の浮動小数点数値。値は、`.flac` または `.wav` 形式のオーディオファイルを `list[float]`、`numpy.ndarray`、または `torch.Tensor` 型の配列として読み込むことで取得できます。*例えば*、torchcodec ライブラリ（`pip install torchcodec`）や soundfile ライブラリ（`pip install soundfile`）を通じて行います。`input_values` として配列を準備するには、パディングと `torch.Tensor` 型への変換のために [AutoProcessor](/docs/transformers/main/ja/model_doc/auto#transformers.AutoProcessor) を使用してください。詳細は [VibeVoiceAsrProcessor.__call__()](/docs/transformers/main/ja/model_doc/vibevoice_asr#transformers.VibeVoiceAsrProcessor.__call__) を参照してください。

padding_mask (`torch.BoolTensor`、形状 `(batch_size, sequence_length)`、*任意*) : パディングの機能インデックスに対する操作の実行を回避するためのマスク。

labels (`torch.LongTensor`、形状 `(batch_size, sequence_length)`、*任意*) : マスク言語モデリング損失を計算するためのラベル。インデックスは `[0, ..., config.vocab_size]` の範囲内であるか、-100 である必要があります（`input_ids` のドキュメント文字列を参照）。インデックスが `-100` に設定されたトークンは無視（マスク）され、損失は `[0, ..., config.vocab_size]` の範囲内のラベルを持つトークンに対してのみ計算されます。

logits_to_keep (`Union[int, torch.Tensor]`、*任意*、デフォルトは `0`) : `int` の場合、最後の `logits_to_keep` トークンについて logits を計算します。`0` の場合、すべての `input_ids` について logits を計算します（特殊ケース）。生成には最後のトークンの logits だけで十分であり、そのトークンのみについて計算することでメモリを節約できます。これは、長いシーケンスや大規模な語彙サイズの場合に特に顕著な効果があります。`torch.Tensor` の場合、シーケンス長次元で保持するインデックスに対応する 1 次元である必要があります。これは、パックされたテンソル形式（バッチとシーケンス長を単一の次元にまとめる形式）を使用する場合に有用です。

sample (`bool`、*任意*、デフォルトは`True`) : 元のモデルと同様に、音響潜在変数にガウスノイズを追加するかどうか（σ-VAE: ノイズのスケールはバッチ項目ごとに N(0, `vae_std`) からサンプリングされる）。False の場合、エンコーダーの出力がそのまま使用されるため、出力は決定論的になります。

**戻り値:** `VibeVoiceAsrCausalLMOutputWithPast` または `tuple(torch.Tensor)`

`VibeVoiceAsrCausalLMOutputWithPast` または、`return_dict=False` が渡された場合、または `config.return_dict=False` の場合、`torch.Tensor` のタプル。構成（[VibeVoiceAsrConfig](/docs/transformers/main/ja/model_doc/vibevoice_asr#transformers.VibeVoiceAsrConfig)）や入力に応じて、さまざまな要素で構成されます。

[VibeVoiceAsrForConditionalGeneration](/docs/transformers/main/ja/model_doc/vibevoice_asr#transformers.VibeVoiceAsrForConditionalGeneration)のforwardメソッドは、`__call__`特殊メソッドをオーバーライドします。

この関数内でフォワードパスの手順を定義する必要がありますが、その後、この関数ではなく`Module`インスタンスを呼び出すべきです。前者は前処理と後処理の実行を適切に処理するのに対し、後者はそれらを無視してしまいます。

- **loss** (`torch.Tensor`、形状 `(1,)`、*任意*、`labels` が指定された場合に返されます) -- 言語モデリングの損失。
- **logits** (`torch.Tensor`、形状 `(batch_size, sequence_length, config.vocab_size)`) -- 予測スコア。
- **past_key_values** (`Cache`、*任意*) -- Cache インスタンス。
- **hidden_states** (`tuple[torch.Tensor]`、*optional*、`output_hidden_states=True` が渡された場合、または `config.output_hidden_states=True` の場合に返されます) -- `torch.Tensor` のタプル（モデルに埋め込み層がある場合はその出力用 1 つ、各層の出力用 1 つずつ）で、形状は `(batch_size, sequence_length, hidden_size)` です。

  各層の出力におけるモデルのHidden-states、および任意の初期埋め込み出力。
- **attentions** (`tuple[torch.Tensor]`、*optional*、`output_attentions=True` が渡された場合または `config.output_attentions=True` の場合に返されます) -- `torch.Tensor` のタプル（各レイヤーごとに1つ）、形状は `(batch_size, num_heads, sequence_length, sequence_length)`。

  アテンションのsoftmax後のアテンション重み。自己アテンションヘッド内で加重平均を計算するために使用されます。
- **audio_hidden_states** (`torch.Tensor`、*任意*) -- 投影されたオーディオの隠れ状態。

例:

```python
>>> from transformers import VibeVoiceAsrForConditionalGeneration, AutoProcessor

>>> model_id = "microsoft/VibeVoice-ASR-HF"
>>> processor = AutoProcessor.from_pretrained(model_id)
>>> model = VibeVoiceAsrForConditionalGeneration.from_pretrained(model_id, dtype="auto", device_map="auto")
```

#### get_audio_features[[transformers.VibeVoiceAsrForConditionalGeneration.get_audio_features]]

```python
get_audio_features(*args, **kwargs)
```

[ソース](https://github.com/huggingface/transformers/blob/main/src/transformers/models/vibevoice_asr/modeling_vibevoice_asr.py#L442)

