Skip to content
VoiceMint Developers

Flutter SDK

Live voice with a VoiceMint agent from a Flutter app, wrapping the native SDKs.

Flutter 3.19+, Android minSdk 24, iOS 15. A platform channel to the Android and iOS SDKs. Source: github.com/alphaaiservice/voicemint-flutter (MIT).

Install#

Not on pub.dev yet; depend on the Git repository:

yaml
dependencies:
  voicemint:
    git:
      url: https://github.com/alphaaiservice/voicemint-flutter
      ref: 0.1.0

Until the native SDKs are published, also build voicemint-android into Maven Local and add the VoiceMintCore / VoiceMint pods from GitHub to ios/Podfile (see the iOS page). Once published: flutter pub add voicemint.

Talk#

dart
import 'package:voicemint/voicemint.dart';

if (!await VoiceMint.requestMicrophonePermission()) return;
final minted = await myApi.voicemintToken(agentId);            // from YOUR backend
final session = VoiceMintSession(token: minted.token, wsUrl: minted.wsUrl);
session.onTranscript = (role, text, isFinal) { if (isFinal) print('$role: $text'); };
await session.start();

Also mute, sendText, stop, onState, onAgentAudioLevel, onError, onEnd, or the session.events stream.