GoogleCloudPlatform / android-docs-samples

Apache License 2.0
375 stars 596 forks source link

How can I enable support multi language #109

Open tungds opened 4 years ago

tungds commented 4 years ago

I found this code in Tutorial:

    // Configure request to enable multiple languages
    RecognitionConfig config =
        RecognitionConfig.newBuilder()
            .setEncoding(AudioEncoding.LINEAR16)
            .setSampleRateHertz(16000)
            .setLanguageCode("ja-JP")
            .addAllAlternativeLanguageCodes(languageList)
            .build();

How to build project to support this function? Thanks