SpeechToTextBeta.viaToken constructor

SpeechToTextBeta.viaToken(
  1. String typeToken,
  2. String token, {
  3. String? cloudSpeechEndpoint,
  4. Map<String, String>? metadata,
})

Creates a SpeechToTextBeta interface using a token. You are responsible for updating the token when it expires.

Implementation

factory SpeechToTextBeta.viaToken(
  String typeToken,
  String token, {
  String? cloudSpeechEndpoint,
  Map<String, String>? metadata,
}) =>
    SpeechToTextBeta._(
        CallOptions(metadata: {
          'authorization': '$typeToken $token',
          ...?metadata,
        }),
        cloudSpeechEndpoint: cloudSpeechEndpoint);