SpeechToTextBeta.viaApiKey constructor

SpeechToTextBeta.viaApiKey(
  1. String apiKey, {
  2. String? cloudSpeechEndpoint,
  3. Map<String, String>? metadata,
})

Creates a SpeechToText interface using a API keys.

Implementation

factory SpeechToTextBeta.viaApiKey(
  String apiKey, {
  String? cloudSpeechEndpoint,
  Map<String, String>? metadata,
}) =>
    SpeechToTextBeta._(
        CallOptions(metadata: {
          'X-goog-api-key': '$apiKey',
          ...?metadata,
        }),
        cloudSpeechEndpoint: cloudSpeechEndpoint);