# Interface SpeechClientInterface

All Superinterfaces:
  `AutoCloseable`

All Known Implementing Classes:
  `VertexSpeechClient`

public interface SpeechClientInterface extends AutoCloseable
Interface for a speech-to-text client. Allows for different implementations (e.g., Cloud, Mocks).

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Closes the client and releases any resources.
  `com.google.cloud.speech.v1.RecognizeResponse`
  `recognize(com.google.cloud.speech.v1.RecognitionConfig config, com.google.cloud.speech.v1.RecognitionAudio audio)`
  Performs synchronous speech recognition.

- ## Method Details

  - ### recognize

    com.google.cloud.speech.v1.RecognizeResponse recognize(com.google.cloud.speech.v1.RecognitionConfig config, com.google.cloud.speech.v1.RecognitionAudio audio) throws Exception
    Performs synchronous speech recognition.
    Parameters:
      `config` - The recognition configuration.
      `audio` - The audio data to transcribe.
    Returns:
      The recognition response.
    Throws:
      `Exception` - if an error occurs during recognition.

  - ### close

    void close() throws Exception
    Closes the client and releases any resources.
    Specified by:
      `close` in interface `AutoCloseable`
    Throws:
      `Exception` - if an error occurs during closing.