パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.6

background_stt

常にバックグラウンドモードで動作する、音声認識および音声合成サービス用のFlutterプラグインです。

AndroidiOS
30日間ダウンロード
85
いいね数
40
Pub ポイント
140

パッケージをインストール

flutter pub add background_stt

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

AndroidおよびiOSでバックグラウンドでの継続的な音声認識(STT)およびテキスト読み上げ(TTS)機能を可能にするFlutterプラグインです。音声アシスタント向けに設計されており、アプリが非アクティブな状態でもリアルタイムの音声変換と音声出力が可能です。プラグインはサービスを永続的に実行するため、常にリスニングまたは応答が必要なハンドフリー用途に最適です。Flutterプロジェクトとのシームレスな統合を実現し、ネイティブコードによる両プラットフォーム固有の実装もサポートしています。

用途

  • 音声制御アプリ
  • 常にオンのアシスタント機能
  • ハンドフリーでのデータ入力
  • ナビゲーション中のリアルタイム音声認識
  • バックグラウンドオーディオフィードバック

主な機能

  • 連続的なバックグラウンド操作
  • クロスプラットフォーム対応(Android および iOS)
  • 内蔵のSTTおよびTTSサービス
  • 最小限のユーザー操作が必要
  • ネイティブサービス統合

適している対象

  • 音声アシスタントを開発する開発者
  • 継続的な音声入力を必要とするアプリ
  • 音声コマンド付きのアクセシビリティツール
  • 音声入力対応の生産性アプリ
  • スマートホーム制御インターフェース

注意事項

  • バックグラウンド処理によるバッテリー消費の増加
  • 両方のプラットフォームで適切な権限が必要です
  • すべてのデバイスメーカーで一貫して動作するとは限りません
  • システムレベルのオーディオルーティングに対する制限されたコントロール
  • 常にリスニング機能に関連するプライバシー上の懸念

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

background_stt

Speech-to-Text, Text-to-speech, Interactive Voice commands
[Android Support Only]

pub package

An flutter plugin that runs Speech-to-Text continously in background. This plugin operates in 2 modes:

1. STT Mode

Voice commands will be recognized in background and sent to Flutter app.

2. Confirmation Mode

Voice commands will be recognized and if confirmation was requested for the command, confirmation flow will begin. Once user has provided with "Positive" or "Negative" reply, confirmation mode will end delivering voice input results to flutter app.

Speech results will be delivered in real-time to the flutter app.

Demo

Install

In your pubspec.yaml

dependencies:
  background_stt: [LATEST_VERSION]
import 'package:background_stt/background_stt.dart';

How to use it?

Start Speech-to-Text Service

Note: Service will keep on running once it is started and can only be stopped by calling stop service method.

 var _service = BackgroundStt();

 _service.startSpeechListenService;
    _service.getSpeechResults().onData((data) {
      print("getSpeechResults: ${data.result} , ${data.isPartial}");
    });
Setup Intent for Simple Confirmation

This can be useful for simple decisions.

    _service.getSpeechResults().onData((data) {
          if (command == "start") {
          _service.confirmIntent(
              confirmationText: "Do you want to start?",
              positiveCommand: "yes",
              negativeCommand: "no");
        }
    });

  _service.getConfirmationResults().onData((data) {
      print(
          "getConfirmationResults: Confirmation Text: ${data.confirmationIntent} , "
          "User Replied: ${data.confirmedResult} , "
          "Is Confirmation Success?: ${data.isSuccess}");
    });
Setup Intent for Voice-Input Confirmation

This can be useful for taking voice input from user and then confirming that input from user by voice command verification.

    _service.getSpeechResults().onData((data) {
          if (command == "address") {
            _service.confirmIntent(
                confirmationText: "What is the address?",
                positiveCommand: "yes",
                negativeCommand: "no",
                voiceInputMessage: "Is the address correct?",
                voiceInput: true);
          }
    });

  _service.getConfirmationResults().onData((data) {
      print(
          "getConfirmationResults: Confirmation Text: ${data.confirmationIntent} , "
          "User Replied: ${data.confirmedResult} , "
          "Voice Input Message: ${data.voiceInput} , "
          "Is Confirmation Success?: ${data.isSuccess}");
    });
Cancel Confirmation in progress

  await _service.cancelConfirmation;
Stop Speech-to-Text Service

  _service.stopSpeechListenService;
Pause Speech-to-Text Listener

  await _service.pauseListening();
Resume Speech-to-Text Listener

  await _service.resumeListening();
Speak Text and Interupt Listener

If you want to queue voice messages, send queue value 'true':

  await _service.speak("Hello",true)

To interupt and speak current playing message, send queue value 'false':

  await _service.speak("Hello",false)

Set speaker pitch and speech rate:

  _service.setSpeaker(0.2, 0.5)

Author

background_stt plugin is developed by Umair Adil. You can email me at <m.umair.adil@gmail.com> for any queries.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。