0

I want to integrate Urdu Language in my android application using Google Speech to Text. Urdu language is supported according to google for speech to text. Can you guide me as to how I can create this:

class AimyboxApplication : Application(), AimyboxProvider {

companion object {
    private const val AIMYBOX_API_KEY = "Ldf0j7WZi3KwNah2aNeXVIACz0lb9qMH"
}

override val aimybox by lazy { createAimybox(this) }

private fun createAimybox(context: Context): Aimybox {
    val unitId = UUID.randomUUID().toString()

    val textToSpeech = GooglePlatformTextToSpeech(context, Locale.ENGLISH)
    val speechToText = GooglePlatformSpeechToText(context, Locale.ENGLISH)

    val dialogApi = AimyboxDialogApi(AIMYBOX_API_KEY, unitId)

    return Aimybox(Config.create(speechToText, textToSpeech, dialogApi))
}

}

It has Locale.English I want it for Urdu as shown on google here:

As you can see Urdu Pakistan is present on googles website.

Zaid Alvi
  • 45
  • 6

1 Answers1

0

You are using the android speechkit library (GooglePlatform), not the Google Cloud speechkit. I think the first one supports only English, but you can use the second one, and configure your API default language from Google Cloud Console (for that, you will need an active billing account), and then integrate it with aimubox.

Reference to documentation with code: https://github.com/just-ai/aimybox-android-sdk/tree/master/google-cloud-speechkit

sɐunıɔןɐqɐp
  • 3,332
  • 15
  • 36
  • 40