License: GPL v3 Language Release pub.dev Build

EmblaCore

EmblaCore is a Flutter library containing the core session functionality in Embla, a cross-platform mobile Icelandic-language voice assistant app. EmblaCore requires Flutter >= 2.17.

For the corresponding JavaScript library, see EmblaCoreJS.

Installation

EmblaCore is available via pub.dev. Add this to the dependencies list in your pubspec.yaml file:

  embla_core: ">=1.0.6"

and then run the following command from the project root:

flutter pub get

EmblaCore uses the Flutter Sound plugin to record audio. In order to work, iOS apps making use of this package must add the following to their Info.plist file:

<key>NSMicrophoneUsageDescription</key>
<string>Microphone permission is required for speech recognition.</string>

Android apps must have the following in their AndroidManifest.xml file:

<uses-permission android:name="android.permission.RECORD_AUDIO" />

The app must also explicitly request permission to record audio from the user. This can be done using the permission_handler package, for instance.

You should run the following code early in your app before starting an Embla session:

EmblaSession.prepare();

This preloads audio files into memory and configures the audio session appropriately.

Documentation

Extensive dartdoc documentation is available here.

Demo App

A simple demo app that demonstrates how to use EmblaCore can viewed at example/lib/main.dart.

To run the demo app, you must acquire an API key from Mideind and add it in the file example/lib/main.dart. Then run the following command from the repo root:

cd example
flutter run -d [your_device_id]

Basic API usage

import 'package:embla_core/embla_core.dart';

...

var config = EmblaSessionConfig();

/* Set properties of config object... */

var session = EmblaSession(config=config);

session.start();

...

session.cancel();

License

EmblaCore is Copyright © 2023 Miðeind ehf.

Miðeind ehf.

This set of programs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This set of programs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The full text of the GNU General Public License v3 is included here and also available here: https://www.gnu.org/licenses/gpl-3.0.html.

If you wish to use this set of programs in ways that are not covered under the GNU GPLv3 license, please contact us at mideind@mideind.is to negotiate a custom license. This applies for instance if you want to include or use this software, in part or in full, in other software that is not licensed under GNU GPLv3 or other compatible licenses.

Libraries

embla_core
EmblaCore library