SpeechToTextV2.viaApiKey constructor

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

Creates a SpeechToText interface using a API keys.

Implementation

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