# transformers 5.24.1 (Apache-2.0), harvested by tools/harvest_corpus.py
=== input

        input_features (`torch.Tensor` of shape `(batch_size, audio_length)`):
            Float values of the raw speech waveform. Raw speech waveform can be
            obtained by loading a `.flac` or `.wav` audio file into an array of type `list[float]`, a
            `numpy.ndarray` or a `torch.Tensor`, *e.g.* via the torchcodec library (`pip install torchcodec`) or
            the soundfile library (`pip install soundfile`). To prepare the array into
            `input_features`, the [`AutoFeatureExtractor`] should be used for padding
            and conversion into a tensor of type `torch.Tensor`.
        decoder_position_ids (`torch.LongTensor` of shape `(batch_size, target_sequence_length)`):
            Indices of positions of each input sequence tokens in the position embeddings.
            Used to calculate the position embeddings up to `config.decoder_config.max_position_embeddings`

        Example:

        ```python
        >>> import torch
        >>> from transformers import AutoFeatureExtractor, CohereAsrModel
        >>> from datasets import load_dataset

        >>> model = CohereAsrModel.from_pretrained("UsefulSensors/cohere_asr-tiny")
        >>> feature_extractor = AutoFeatureExtractor.from_pretrained("UsefulSensors/cohere_asr-tiny")
        >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
        >>> inputs = feature_extractor(ds[0]["audio"]["array"], return_tensors="pt")
        >>> input_features = inputs.input_features
        >>> decoder_input_ids = torch.tensor([[1, 1]]) * model.config.decoder_start_token_id
        >>> last_hidden_state = model(input_features, decoder_input_ids=decoder_input_ids).last_hidden_state
        >>> list(last_hidden_state.shape)
        [1, 2, 288]
        ```
        
=== parse google
short_description: 'input_features (`torch.Tensor` of shape `(batch_size, audio_length)`):'
long_description: |
      Float values of the raw speech waveform. Raw speech waveform can be
      obtained by loading a `.flac` or `.wav` audio file into an array of type `list[float]`, a
      `numpy.ndarray` or a `torch.Tensor`, *e.g.* via the torchcodec library (`pip install torchcodec`) or
      the soundfile library (`pip install soundfile`). To prepare the array into
      `input_features`, the [`AutoFeatureExtractor`] should be used for padding
      and conversion into a tensor of type `torch.Tensor`.
  decoder_position_ids (`torch.LongTensor` of shape `(batch_size, target_sequence_length)`):
      Indices of positions of each input sequence tokens in the position embeddings.
      Used to calculate the position embeddings up to `config.decoder_config.max_position_embeddings`
  
  ```python
  >>> import torch
  >>> from transformers import AutoFeatureExtractor, CohereAsrModel
  >>> from datasets import load_dataset
  
  >>> model = CohereAsrModel.from_pretrained("UsefulSensors/cohere_asr-tiny")
  >>> feature_extractor = AutoFeatureExtractor.from_pretrained("UsefulSensors/cohere_asr-tiny")
  >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
  >>> inputs = feature_extractor(ds[0]["audio"]["array"], return_tensors="pt")
  >>> input_features = inputs.input_features
  >>> decoder_input_ids = torch.tensor([[1, 1]]) * model.config.decoder_start_token_id
  >>> last_hidden_state = model(input_features, decoder_input_ids=decoder_input_ids).last_hidden_state
  >>> list(last_hidden_state.shape)
  [1, 2, 288]
  ```
blank_after_short_description: True
blank_after_long_description: True
style: google
- DocstringExample
  kind: examples
  key: 'examples'
=== detect
google
=== compose google
input_features (`torch.Tensor` of shape `(batch_size, audio_length)`):

    Float values of the raw speech waveform. Raw speech waveform can be
    obtained by loading a `.flac` or `.wav` audio file into an array of type `list[float]`, a
    `numpy.ndarray` or a `torch.Tensor`, *e.g.* via the torchcodec library (`pip install torchcodec`) or
    the soundfile library (`pip install soundfile`). To prepare the array into
    `input_features`, the [`AutoFeatureExtractor`] should be used for padding
    and conversion into a tensor of type `torch.Tensor`.
decoder_position_ids (`torch.LongTensor` of shape `(batch_size, target_sequence_length)`):
    Indices of positions of each input sequence tokens in the position embeddings.
    Used to calculate the position embeddings up to `config.decoder_config.max_position_embeddings`

```python
>>> import torch
>>> from transformers import AutoFeatureExtractor, CohereAsrModel
>>> from datasets import load_dataset

>>> model = CohereAsrModel.from_pretrained("UsefulSensors/cohere_asr-tiny")
>>> feature_extractor = AutoFeatureExtractor.from_pretrained("UsefulSensors/cohere_asr-tiny")
>>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
>>> inputs = feature_extractor(ds[0]["audio"]["array"], return_tensors="pt")
>>> input_features = inputs.input_features
>>> decoder_input_ids = torch.tensor([[1, 1]]) * model.config.decoder_start_token_id
>>> last_hidden_state = model(input_features, decoder_input_ids=decoder_input_ids).last_hidden_state
>>> list(last_hidden_state.shape)
[1, 2, 288]
```

Examples:
