# GoogleSpeechToTextLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/google_speech_to_text/GoogleSpeechToTextLoader)

Loader for Google Cloud Speech-to-Text audio transcripts.

It uses the Google Cloud Speech-to-Text API to transcribe audio files
and loads the transcribed text into one or more Documents,
depending on the specified format.

To use, you should have the ``google-cloud-speech`` python package installed.

Audio files can be specified via a Google Cloud Storage uri or a local file path.

For a detailed explanation of Google Cloud Speech-to-Text, refer to the product
documentation.
https://cloud.google.com/speech-to-text

## Signature

```python
GoogleSpeechToTextLoader(
    self,
    project_id: str,
    file_path: str,
    location: str = 'us-central1',
    recognizer_id: str = '_',
    config: Optional[RecognitionConfig] = None,
    config_mask: Optional[FieldMask] = None,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | `str` | Yes | Google Cloud Project ID. |
| `file_path` | `str` | Yes | A Google Cloud Storage URI or a local file path. |
| `location` | `str` | No | Speech-to-Text recognizer location. (default: `'us-central1'`) |
| `recognizer_id` | `str` | No | Speech-to-Text recognizer id. (default: `'_'`) |
| `config` | `Optional[RecognitionConfig]` | No | Recognition options and features. For more information: https://cloud.google.com/python/docs/reference/speech/latest/google.cloud.speech_v2.types.RecognitionConfig (default: `None`) |
| `config_mask` | `Optional[FieldMask]` | No | The list of fields in config that override the values in the ``default_recognition_config`` of the recognizer during this recognition request. For more information: https://cloud.google.com/python/docs/reference/speech/latest/google.cloud.speech_v2.types.RecognizeRequest (default: `None`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    project_id: str,
    file_path: str,
    location: str = 'us-central1',
    recognizer_id: str = '_',
    config: Optional[RecognitionConfig] = None,
    config_mask: Optional[FieldMask] = None,
)
```

| Name | Type |
|------|------|
| `project_id` | `str` |
| `file_path` | `str` |
| `location` | `str` |
| `recognizer_id` | `str` |
| `config` | `Optional[RecognitionConfig]` |
| `config_mask` | `Optional[FieldMask]` |


## Properties

- `project_id`
- `file_path`
- `location`
- `recognizer_id`
- `config`
- `config_mask`

## Methods

- [`load()`](https://reference.langchain.com/python/langchain-community/document_loaders/google_speech_to_text/GoogleSpeechToTextLoader/load)

## ⚠️ Deprecated

Deprecated since version 0.0.32.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/document_loaders/google_speech_to_text.py#L16)