So setzen Sie Anmeldeinformationen für die Java -Google -API von Speechclient

CredentialsProvider credentialsProvider = FixedCredentialsProvider.create(ServiceAccountCredentials.fromStream(new FileInputStream("path/to/service-account.json")));

SpeechSettings settings = SpeechSettings.newBuilder().setCredentialsProvider(credentialsProvider).build();
SpeechClient speechClient = SpeechClient.create(settings);
Trakevital