just-ai / aimybox-ios-assistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aimybox voice assistant

Open source voice assistant built on top of Aimybox SDK

Twitter Follow

Android version is available here

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
  • Works with any NLU providers like Aimylogic
  • 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 Swift
  • Embeddable into any iOS application
  • 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

AimyboxUI is available through CocoaPods. To install it, simply add the following line to your Podfile:

  pod 'AimyboxUI'

Then you should configure your assistant with necessary components

For example:

  pod 'Aimybox/Core'
  pod 'Aimybox/AimyboxDialogAPI'
  pod 'Aimybox/SFSpeechToText'
  pod 'Aimybox/AVTextToSpeech'

Then you need add following in your Info.plist file to describe why your app need microphone and speech recognition permissions.

<key>NSMicrophoneUsageDescription</key>
<string>This app use a microphone to record your speech</string>
  
<key>NSSpeechRecognitionUsageDescription</key>
<string>This app will use speech recognition</string>

You can manualy present AimyboxView and setup Aimybox or use AimyboxOpenButton to open assistant with default circular animation to make this process automatic.

After that you need create AimyboxProvider instance and pass it to AimyboxView.

If you use AimyboxOpenButton you need to pass AimyboxProvider in AimyboxViewController.onViewDidLoad() closure.

AimyboxViewController.onViewDidLoad = { vc in

  let aimyboxView = vc.aimyboxView

  aimyboxView.provider = #SomeAimyboxProviderInstance#
}

After presenting AimyboxView recognition will start automaticaly or if you want to manualy control it, set shouldAutoStartRecognition property of AimyboxView to false.

Available Components

AimyboxProvider

Provides Aimybox instance to UI lib.

AimyboxView

Main view that bake inside UITableView and presents user and assistant messages.

AimyboxViewController

Used for circular animation when presenting AimyboxView with AimyboxOpenButton.

Custom design

To make any custom designs, all UI elements have static methods that called on instance init. For example:

class AimyboxTextCell: UITableViewCell {
    /**
     Use this method to customize appearance of this cell.
     */
    public static var onAwakeFromNib: ((AimyboxTextCell) -> ())?

    ...    
}

More details

Please refer to the demo app to see how to use Aimybox library in your own project.

Documentation

There is a full Aimybox documentation available here.

About

License:Apache License 2.0


Languages

Language:Swift 94.5%Language:Ruby 2.9%Language:Objective-C 2.6%