패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.6

background_stt

백그라운드 모드에서 항상 활성화된 음성 인식 및 텍스트 음성 변환 서비스를 위한 플러터 플러그인입니다.

AndroidiOS
30일 다운로드
95
좋아요
40
Pub 점수
140

패키지 설치

flutter pub add background_stt

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Android 및 iOS에서 백그라운드에서 지속적인 음성-텍스트(STT) 및 텍스트-음성(TTS) 기능을 가능하게 하는 플러터 플러그인입니다. 음성 보조기능에 최적화되어 있으며, 앱이 비활성 상태일 때도 실시간 전사 및 오디오 출력이 가능합니다. 플러그인은 서비스를 지속적으로 실행하여 항상 듣기 또는 반응이 필요한 핸즈프리 애플리케이션에 이상적입니다. 플러터 프로젝트와 원활하게 통합되며, 네이티브 코드를 통해 각 플랫폼별 구현을 지원합니다.

사용 사례

  • 음성 제어 앱
  • 항상 켜진 보조 기능
  • hands-free 데이터 입력
  • 내비게이션 중 실시간 음성 인식
  • 백그라운드 오디오 피드백

주요 기능

  • 지속적인 백그라운드 작동
  • 크로스 플랫폼 지원 (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.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.