# aimybox-android-assistant **Repository Path**: sunqiang25/aimybox-android-assistant ## Basic Information - **Project Name**: aimybox-android-assistant - **Description**: Embeddable voice assistant written in Kotlin for Android apps - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-12-12 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
# Key Features
* Provides ready to use **UI components** for fast building of your voice assistant app
* Modular and independent from speech-to-text, text-to-speech and NLU vendors
* Provides ready to use speech-to-text and text-to-speech implementations like [Android platform speechkit](https://github.com/just-ai/aimybox-android-sdk/tree/master/google-platform-speechkit), [Google Cloud speechkit](https://github.com/just-ai/aimybox-android-sdk/tree/master/google-cloud-speechkit), [Houndify](https://github.com/just-ai/aimybox-android-sdk/tree/master/houndify-speechkit) or [Snowboy wake word trigger](https://github.com/just-ai/aimybox-android-sdk/tree/master/snowboy-speechkit)
* Works with any NLU providers like [Aimylogic](https://help.aimybox.com/en/article/aimylogic-webhook-5quhb1/) or [Dialogflow](https://help.aimybox.com/en/article/dialogflow-agent-cqdvjn/)
* Fully customizable and extendable, you can connect any other speech-to-text, text-to-speech and NLU services
* Open source under Apache 2.0, written in pure Kotlin
* Embeddable into any application or device running Android
* Voice skills logic and complexity is not limited by any restrictions
* Can interact with any local device services and local networks
# How to start using
Just clone this repository and try to build and run the app module 😉
If you want some details - there is how to do the same with your hands.
1. Create a new Android project with next dependencies in the _build.gradle_ file
```kotlin
android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
repositories {
maven("https://dl.bintray.com/aimybox/aimybox-android-assistant/")
maven("https://dl.bintray.com/aimybox/aimybox-android-sdk/")
}
dependencies {
implementation("com.justai.aimybox:core:0.6.0")
implementation("com.justai.aimybox:components:0.1.7")
}
```
2. Add one or more dependencies of third party speech-to-text and text-to-speech libraries. For example
```kotlin
implementation("com.justai.aimybox:google-platform-speechkit:0.5.0")
```
3. Create a new project in [Aimybox console](https://app.aimybox.com), enable some voice skills and **copy your project's API key**.
4. Instantiate [Aimybox](https://github.com/just-ai/aimybox-android-sdk/blob/master/core/src/main/java/com/justai/aimybox/Aimybox.kt) in your [Application](https://github.com/just-ai/aimybox-android-assistant/blob/master/app/src/main/java/com/justai/aimybox/assistant/AimyboxApplication.kt) class like that
```kotlin
class AimyboxApplication : Application(), AimyboxProvider {
companion object {
private const val AIMYBOX_API_KEY = "your Aimybox project key"
}
override val aimybox by lazy { createAimybox(this) }
private fun createAimybox(context: Context): Aimybox {
val unitId = UUID.randomUUID().toString()
val textToSpeech = GooglePlatformTextToSpeech(context)
val speechToText = GooglePlatformSpeechToText(context)
val dialogApi = AimyboxDialogApi(AIMYBOX_API_KEY, unitId)
return Aimybox(Config.create(speechToText, textToSpeech, dialogApi))
}
}
```
5. Add `FrameLayout` to your application's layout like this
```xml