1CredentialsProvider credentialsProvider = FixedCredentialsProvider.create(ServiceAccountCredentials.fromStream(new FileInputStream("path/to/service-account.json")));
2
3SpeechSettings settings = SpeechSettings.newBuilder().setCredentialsProvider(credentialsProvider).build();
4SpeechClient speechClient = SpeechClient.create(settings);
5