Giter VIP home page Giter VIP logo

speech_to_text's People

Contributors

atrope avatar ayaahmed177 avatar briankolowitz avatar bungeefan avatar cselti avatar dejong-it avatar figengungor avatar fpinzn avatar geisterfurz007 avatar haresh-v521 avatar jheimes-silveira avatar jinosh05 avatar kaladron avatar m-derakhshi avatar markszente avatar masewo avatar rayrapetyan avatar rsydor avatar snekag avatar sowens-csd avatar thandal avatar tyfkda avatar vongrad avatar wamynobe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

speech_to_text's Issues

Only one initialize at a time

I observe the following behavior, if I am using lib for the first time and do not apply the permission, I cannot change the initialize method as it loops in the following error.

Only one initialize at a time

The way I found to request permission more than once if the user did not grant permission was to remove the following code snippet.

         if (null! = activeResult) {
             result.error (SpeechToTextErrors.multipleRequests.name,
                     "Only one initialize at a time", null)
             return
         }

I think a lot of other people must be going through the same problem as mine.

I can use a Audio File to recongnize?

Hello everyone,

I Want to realize speech to text in one file that I save, is it posible?
If no, Can I save the audio and recognize in the same time?

If some of this are posible, can someone send me a example?

Thanks.
Best Regards.

error_timeout

why ?
notifyError {"errorMsg":"error_timeout","permanent":true}

Speech recognition unavailable

I followed the tutorial and installed 0.8.0. The emulator app keeps throwing unavailable.

Screenshot

image

Code

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:speech_to_text/speech_to_text.dart';
import 'package:speech_to_text/speech_recognition_result.dart';
import 'package:speech_to_text/speech_recognition_error.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool _hasSpeech = false;
  String lastWords = "";
  String lastError = "";
  String lastStatus = "";
  final SpeechToText speech = SpeechToText();

  @override
  void initState() {
    super.initState();
    initSpeechState();
  }

  Future<void> initSpeechState() async {
    bool hasSpeech = await speech.initialize(
        onError: errorListener, onStatus: statusListener);

    if (!mounted) return;
    setState(() {
      _hasSpeech = hasSpeech;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Speech to Text Example'),
        ),
        body: _hasSpeech
            ? Column(children: [
                Expanded(
                  child: Center(
                    child: Text('Speech recognition available'),
                  ),
                ),
                Expanded(
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: <Widget>[
                      FlatButton(
                        child: Text('Start'),
                        onPressed: startListening,
                      ),
                      FlatButton(
                        child: Text('Stop'),
                        onPressed: stopListening,
                      ),
                      FlatButton(
                        child: Text('Cancel'),
                        onPressed: cancelListening,
                      ),
                    ],
                  ),
                ),
                Expanded(
                  child: Column(
                    children: <Widget>[
                      Center(
                        child: Text('Recognized Words'),
                      ),
                      Center(
                        child: Text(lastWords),
                      ),
                    ],
                  ),
                ),
                Expanded(
                  child: Column(
                    children: <Widget>[
                      Center(
                        child: Text('Error'),
                      ),
                      Center(
                        child: Text(lastError),
                      ),
                    ],
                  ),
                ),
                Expanded(
                  child: Center(
                    child: speech.isListening
                        ? Text("I'm listening...")
                        : Text('Not listening'),
                  ),
                ),
              ])
            : Center(
                child: Text('Speech recognition unavailable',
                    style: TextStyle(
                        fontSize: 20.0, fontWeight: FontWeight.bold))),
      ),
    );
  }

  void startListening() {
    lastWords = "";
    lastError = "";
    speech.listen(onResult: resultListener);
    setState(() {});
  }

  void stopListening() {
    speech.stop();
    setState(() {});
  }

  void cancelListening() {
    speech.cancel();
    setState(() {});
  }

  void resultListener(SpeechRecognitionResult result) {
    setState(() {
      lastWords = "${result.recognizedWords} - ${result.finalResult}";
    });
  }

  void errorListener(SpeechRecognitionError error) {
    setState(() {
      lastError = "${error.errorMsg} - ${error.permanent}";
    });
  }

  void statusListener(String status) {
    setState(() {
      lastStatus = "$status";
    });
  }
}

Flutter Version

v1.12.13+hotfix.8

Not compatible with flutter_tts

I want to build an app, where you speak a word and flutter_tts speaks the data that was found to the search term in the database. The problem what I found out is, after the speech to text was used once flutter_tts do not speaks anymore:/
But this issue only comes to me on the real device (iPhones), in the ios Simulator everything is working fine. Do you have an idea, why that happens?

You can reproduce that issue if you add to your example app

FloatingActionButton(onPressed: () {
                        FlutterTts flutterTts = new FlutterTts();
                        flutterTts.setLanguage("en-US");
                        flutterTts.speak(lastWords);
                      }),

this snipped of code.
I really can't understand why it is working on the Simulator but not on the real device (ios)

Is there any support for locale?

I'm writing an app that requires Japanese speech-to-text, but every speech to text lib (only 2 of them, this one included) doesn't seem to have Japanese

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.

When Running my project , i get this error :

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
The following dependencies do not satisfy the required version:
project ':speech_to_text' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

But I sure i have kotlin version above 1.3.10

generating a build for iOS introduces an error in 'SwiftSpeechToTextPlugin' is only available on iOS 10.0 or later [-Wunguarded-Availability]

following log is displayed

Building br.com.sankhya.biaAssistantFlutter for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: HV5V7KBQHK
Running pod install...                                              1,9s
Running Xcode build...                                          
Xcode build done.                                           15,2s
Failed to build iOS app
Error output from Xcode build:
↳
    2019-12-27 13:04:04.065 xcodebuild[21809:175441]  DTDeviceKit: deviceType from 37ad1425578933ae32b2a67eadc4eaa8f8096cb8 was NULL
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/ellenguissoni/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-0.7.0/ios/Classes/SpeechToTextPlugin.m:6:4: warning: 'SwiftSpeechToTextPlugin' is only available on iOS 10.0 or newer [-Wunguarded-availability]
      [SwiftSpeechToTextPlugin registerWithRegistrar:registrar];
       ^~~~~~~~~~~~~~~~~~~~~~~
    In file included from /Users/ellenguissoni/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-0.7.0/ios/Classes/SpeechToTextPlugin.m:2:
    /Users/ellenguissoni/Desktop/sankhya/bia-assistant-flutter/build/ios/Release-iphoneos/speech_to_text/speech_to_text.framework/Headers/speech_to_text-Swift.h:456:12: note: 'SwiftSpeechToTextPlugin' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 8.0.0
    @interface SwiftSpeechToTextPlugin : NSObject <FlutterPlugin>
               ^
    /Users/ellenguissoni/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-0.7.0/ios/Classes/SpeechToTextPlugin.m:6:4: note: enclose 'SwiftSpeechToTextPlugin' in an @available check to silence this warning
      [SwiftSpeechToTextPlugin registerWithRegistrar:registrar];
       ^~~~~~~~~~~~~~~~~~~~~~~
    1 warning generated.
    /Users/ellenguissoni/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-0.7.0/ios/Classes/SpeechToTextPlugin.m:6:4: warning: 'SwiftSpeechToTextPlugin' is only available on iOS 10.0 or newer [-Wunguarded-availability]
      [SwiftSpeechToTextPlugin registerWithRegistrar:registrar];
       ^~~~~~~~~~~~~~~~~~~~~~~
    In file included from /Users/ellenguissoni/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-0.7.0/ios/Classes/SpeechToTextPlugin.m:2:
    /Users/ellenguissoni/Desktop/sankhya/bia-assistant-flutter/build/ios/Release-iphoneos/speech_to_text/speech_to_text.framework/Headers/speech_to_text-Swift.h:211:12: note: 'SwiftSpeechToTextPlugin' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 8.0.0
    @interface SwiftSpeechToTextPlugin : NSObject <FlutterPlugin>
               ^
    /Users/ellenguissoni/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-0.7.0/ios/Classes/SpeechToTextPlugin.m:6:4: note: enclose 'SwiftSpeechToTextPlugin' in an @available check to silence this warning
      [SwiftSpeechToTextPlugin registerWithRegistrar:registrar];
       ^~~~~~~~~~~~~~~~~~~~~~~
    1 warning generated.
    Building AOT snapshot in release mode (ios-release)...          

    Compiler message:

    Error: SDK summary not found: ../../flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/platform_strong.dill.

    Error: Error when reading '../../flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/platform_strong.dill': No such file or directory

    Error: Error when reading '../../flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/platform_strong.dill': No such file or directory

    Unhandled exception:
    Crash when compiling package:bia_assistant_flutter/main.dart,
    at character offset null:
    Bad state: Empty input given.
    #0      BinaryBuilder._checkEmptyInput (package:kernel/binary/ast_from_binary.dart:457:29)
    #1      BinaryBuilder.readComponent.<anonymous closure> (package:kernel/binary/ast_from_binary.dart:474:7)
    #2      Timeline.timeSync (dart:developer/timeline.dart:163:22)
    #3      BinaryBuilder.readComponent (package:kernel/binary/ast_from_binary.dart:472:21)
    #4      ProcessedOptions.loadComponent (package:front_end/src/base/processed_options.dart:410:10)
    #5      ProcessedOptions.loadLinkDependencies.<anonymous closure> (package:front_end/src/base/processed_options.dart:394:35)
    #6      MappedListIterable.elementAt (dart:_internal/iterable.dart:417:29)
    #7      ListIterable.toList (dart:_internal/iterable.dart:221:19)
    #8      ProcessedOptions.loadLinkDependencies (package:front_end/src/base/processed_options.dart:394:67)
    <asynchronous suspension>
    #9      generateKernelInternal.<anonymous closure> (package:front_end/src/kernel_generator_impl.dart:115:48)
    <asynchronous suspension>
    #10     withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)
    #11     generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:70:10)
    #12     kernelForProgramInternal.<anonymous closure> (package:front_end/src/api_prototype/kernel_generator.dart:61:35)
    #13     CompilerContext.runWithOptions.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:135:20)
    <asynchronous suspension>
    #14     CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:123:46)
    #15     new Future.sync (dart:async/future.dart:224:31)
    #16     CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:123:19)
    #17     _rootRun (dart:async/zone.dart:1126:13)
    #18     _CustomZone.run (dart:async/zone.dart:1023:19)
    #19     _runZoned (dart:async/zone.dart:1518:10)
    #20     runZoned (dart:async/zone.dart:1465:12)
    #21     CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:122:12)
    #22     CompilerContext.runWithOptions (package:front_end/src/fasta/compiler_context.dart:133:10)
    #23     kernelForProgramInternal (package:front_end/src/api_prototype/kernel_generator.dart:60:32)
    #24     kernelForProgram (package:front_end/src/api_prototype/kernel_generator.dart:52:17)
    #25     compileToKernel (package:vm/kernel_front_end.dart:320:41)
    #26     FrontendCompiler.compile.<anonymous closure> (package:frontend_server/frontend_server.dart:446:54)
    #27     new Future.<anonymous closure> (dart:async/future.dart:176:37)
    #28     _rootRun (dart:async/zone.dart:1122:38)
    #29     _CustomZone.run (dart:async/zone.dart:1023:19)
    #30     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
    #31     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
    #32     _rootRun (dart:async/zone.dart:1126:13)
    #33     _CustomZone.run (dart:async/zone.dart:1023:19)
    #34     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
    #35     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:23:15)
    #36     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:384:19)
    #37     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:418:5)
    #38     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)


    #0      BinaryBuilder._checkEmptyInput (package:kernel/binary/ast_from_binary.dart:457:29)
    #1      BinaryBuilder.readComponent.<anonymous closure> (package:kernel/binary/ast_from_binary.dart:474:7)
    #2      Timeline.timeSync (dart:developer/timeline.dart:163:22)
    #3      BinaryBuilder.readComponent (package:kernel/binary/ast_from_binary.dart:472:21)
    #4      ProcessedOptions.loadComponent (package:front_end/src/base/processed_options.dart:410:10)
    #5      ProcessedOptions.loadLinkDependencies.<anonymous closure> (package:front_end/src/base/processed_options.dart:394:35)
    #6      MappedListIterable.elementAt (dart:_internal/iterable.dart:417:29)
    #7      ListIterable.toList (dart:_internal/iterable.dart:221:19)
    #8      ProcessedOptions.loadLinkDependencies (package:front_end/src/base/processed_options.dart:394:67)
    <asynchronous suspension>
    #9      generateKernelInternal.<anonymous closure> (package:front_end/src/kernel_generator_impl.dart:115:48)
    <asynchronous suspension>
    #10     withCrashReporting (package:front_end/src/fasta/crash.dart:122:24)
    #11     generateKernelInternal (package:front_end/src/kernel_generator_impl.dart:70:10)
    #12     kernelForProgramInternal.<anonymous closure> (package:front_end/src/api_prototype/kernel_generator.dart:61:35)
    #13     CompilerContext.runWithOptions.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:135:20)
    <asynchronous suspension>
    #14     CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:123:46)
    #15     new Future.sync (dart:async/future.dart:224:31)
    #16     CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:123:19)
    #17     _rootRun (dart:async/zone.dart:1126:13)
    #18     _CustomZone.run (dart:async/zone.dart:1023:19)
    #19     _runZoned (dart:async/zone.dart:1518:10)
    #20     runZoned (dart:async/zone.dart:1465:12)
    #21     CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:122:12)
    #22     CompilerContext.runWithOptions (package:front_end/src/fasta/compiler_context.dart:133:10)
    #23     kernelForProgramInternal (package:front_end/src/api_prototype/kernel_generator.dart:60:32)
    #24     kernelForProgram (package:front_end/src/api_prototype/kernel_generator.dart:52:17)
    #25     compileToKernel (package:vm/kernel_front_end.dart:320:41)
    #26     FrontendCompiler.compile.<anonymous closure> (package:frontend_server/frontend_server.dart:446:54)
    #27     new Future.<anonymous closure> (dart:async/future.dart:176:37)
    #28     _rootRun (dart:async/zone.dart:1122:38)
    #29     _CustomZone.run (dart:async/zone.dart:1023:19)
    #30     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
    #31     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
    #32     _rootRun (dart:async/zone.dart:1126:13)
    #33     _CustomZone.run (dart:async/zone.dart:1023:19)
    #34     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
    #35     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:23:15)
    #36     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:384:19)
    #37     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:418:5)
    #38     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)


    Compiler terminated unexpectedly.
    Failed to build /Users/ellenguissoni/Desktop/sankhya/bia-assistant-flutter.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning build
    note: Constructing build description

Encountered error while building for device.
Process finished with exit code 1

onRmsChanged not found

I couldn't access a recognition function from: onRmsChanged where I need to change the values to apply an animation to my screen, any solution for me to get this data?

msg: error_audio_error, permanent: true

suddenly my code give me that error message on version 0.7 & `0.7.1'

SpeechRecognitionError msg: error_audio_error, permanent: true
I have test your example code also give me same issue

I don't know what message mean , please let me know what is meaning ?

Can't be changed to another error & status handler

Can't change the error & status handler try to a new speech instance when I had another speech instance.
Try to fix it by the bottom code, and it's working but not sure it's right way.
Future<bool> initialize( {SpeechErrorListener onError, SpeechStatusListener onStatus}) async { if (_initWorked) { errorListener = onError; statusListener = onStatus; channel.setMethodCallHandler(_handleCallbacks); return Future.value(_initWorked); } errorListener = onError; statusListener = onStatus; channel.setMethodCallHandler(_handleCallbacks); _initWorked = await channel.invokeMethod('initialize'); return _initWorked; }

MissingPluginException conflict with other plugin

My app access on database in backend mode after user terminated app, after update that issue show up to me

MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekartik.sqflite)
I tested all solutions I know and I found in internet but I found nothing so I have disabled plugin one by one until speech_to_text : 0.8.0 after that database work great and issue has disappear .

i'm work on flutter 1.2

Called "cancel" but still returning error no match

as title

log

I/flutter (15123): 2020-02-12 02:53:48.652658 FINE [Page] _speechInputCancel()
I/flutter (15123): 2020-02-12 02:53:48.653389 FINE [SpeechService] cancel()
I/flutter (15123): SpeechToText call: notifyStatus notListening
I/flutter (15123): 2020-02-12 02:53:48.655197 FINE [Page] _speechOnStatus()
I/flutter (15123): 2020-02-12 02:53:48.655383 FINEST [Page] available: true
I/flutter (15123): 2020-02-12 02:53:48.655480 FINEST [Page] listening: false
I/flutter (15123): 2020-02-12 02:53:48.656249 FINEST [Page] cancel: 
...

I/flutter (15123): SpeechToText call: notifyError {"errorMsg":"error_no_match","permanent":true}
I/flutter (15123): 2020-02-12 02:53:49.042349 FINE [Page] _speechOnError()
I/flutter (15123): 2020-02-12 02:53:49.042699 FINEST [Page] error: SpeechRecognitionError msg: error_no_match, permanent: true

as comment of cancel()
/// Canceling means that there will be no final result returned from the
/// recognizer. Note Cannot be used until a successful [initialize] call.

is it because the "error no match" is partial result?

could you please make the api client, SpeechToText, able to config whether partial result is needed
kotlin```
272 putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true)
273 Log.d(logTag, "put partial")


thanks very much

"flutter pub get" get no files from 0.7.2 only the folder

Using the "flutter pub get" with ^0.7.2 in pubspec only get me the folder, with nothing inside.

The 0.7.1 downloads and works, but is not building for iOS.

I have also downloaded the 0.7.2 version and put in my project, but the channel invocation was not working.

Also, this week it was coming with some kind of corrupted data in the files.

Remove plugin logs or let them be activated with a flag

I'm currently working with this plugin but it is annoying that every time I make a plugin call, everything that is happening behind the scenes is logged to my console. This can be conflictive with the logs that I'm using to debug my app and it is really tedious to browse through all the logs from the plugin to find 1 log from my app.

This should be eliminated from the plugin or at least add a flag that can be set to debug this calls like SpeechToText(debug: true)

I'm willing to help to do this if you need me to.

Thanks in advance

Image of my logged code

Build Fail for IOS

I have this error when i try to build for IOS

** BUILD FAILED **
Xcode's output:

/Users/user921647/development/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-0.8.0/ios/Classes/SwiftSpeechToTextPlugin.swift:185:51: error: 'AVAudioSession.Category' (aka 'NSString') is not implicitly convertible to 'String'; did you mean to use 'as' to explicitly convert?
try self.audioSession.setCategory(rememberedAudioCategory)
^
as String
/Users/user921647/development/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-0.8.0/ios/Classes/SwiftSpeechToTextPlugin.swift:201:57: error: cannot assign value of type 'String' to type 'AVAudioSession.Category?' (aka 'Optional')
rememberedAudioCategory = self.audioSession.category
~~~~~~~~~~~~~~~~~~^~~~~~~~
as AVAudioSession.Category
/Users/user921647/development/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-0.8.0/ios/Classes/SwiftSpeechToTextPlugin.swift:202:71: error: type 'AVAudioSession.Category' (aka 'NSString') has no member 'playAndRecord'
try self.audioSession.setCategory(AVAudioSession.Category.playAndRecord)
~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~
/Users/user921647/development/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-0.8.0/ios/Classes/SwiftSpeechToTextPlugin.swift:203:63: error: type 'AVAudioSession.Mode' (aka 'NSString') has no member 'measurement'
try self.audioSession.setMode(AVAudioSession.Mode.measurement)
note: Using new build system
note: Planning build
note: Constructing build description
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Exited (sigterm)

All is fine for android

Crashing on iOS.

The 0.8.0 version is crashing the app sometimes in iOS. Is there any known issue related or something i must do to avoid crashing?
Works fine on Android.

Duration Issue

i want use Listener for 5 minutes even after setting the listenFor Duration it stops listening can you help me with this

Restart the listener.

I want the listener to be active for 10 - 15 minutes.But when the listener is idle for few seconds it will stop listening . How should i restart the listener in that case?

Once there is an error like
1)notifyError {"errorMsg":"error_no_match","permanent":true}
2)notifyError {"errorMsg":"error_busy","permanent":true}

How do i restart the listener again.

Speech recognition only works once

If you do a recognition, click on stop and try again immediately, no text will be recognised. Only if you wait for approx 30 seconds, recognition will work again.

not satisfy the required version

I'm trying no to upgrade my flutter to 1.12 and facing this issue any idea
`FAILURE: Build failed with an exception.

  • What went wrong:
    The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
    The following dependencies do not satisfy the required version:
    project ':speech_to_text' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0`

callback error of result.final variable Result

I'm testing with an iOS version 13.2.3 and noticed that the result.finalResult variable is always returning me with the false value even at the end of the audio capture, but when I test with android the result.finalResult variable returns me the value true

how to keep control mic on own

I am trying to develop an app that requires this plugin. When I run the example app I noticed that you can not keep mic open for a longer time. If it doesn't listen to the voice it shuts down. Is it the android issue or I am not using the plugin in the right way

not work with kotlin 3

after install in_app_purchase that depends on kotlin 3 I have facing issue with build so I remove speech_to_text and try install it again , now I can't

So, because stok_app_a depends on both speech_to_text ^0.6.3 and in_app_purchase ^0.2.2+4, version solving failed.
pub get failed (1; So, because stok_app_a depends on both speech_to_text ^0.6.3 and in_app_purchase ^0.2.2+4, version solving failed.)

'error_no_match' does not get fired after the update from 0.7.1 to 1.1.0

The callback onError does not get triggered when the error type is ''error_no_match"

But there are logs from the library witch says that the error has been notified.

I/flutter (23187): SpeechToText call: textRecognition {"finalResult":false,"alternates":[{"recognizedWords":"","confidence":-1}]}
I/flutter (23187): SpeechToText call: notifyError {"errorMsg":"error_no_match","permanent":true}

Occasional crash in speech_to_text

An application was crashing with a sigabrt in speech_to_text occasionally. Sometimes when coming back into the foreground, sometimes while running. The stack trace pointed to the invokeFlutter method in speech_to_text. Looks like the parameters were incorrect in the case of a speechRecognizer availabilityDidChange callback.

#0 (null) in __exceptionPreprocess ()
#1 (null) in objc_exception_throw ()
#2 (null) in +[NSException raise:format:arguments:] ()
#3 (null) in -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] ()
#4 (null) in -[FlutterStandardWriter writeValue:] ()
#5 0x37553a in -[FlutterStandardMethodCodec encodeMethodCall:] ()
#6 0x3723f2 in -[FlutterMethodChannel invokeMethod:arguments:] ()
#7 0xc07ae6 in partial apply for closure #1 in SwiftSpeechToTextPlugin.invokeFlutter(_:arguments:) at /Users/.../speech_to_text/ios/Classes/SwiftSpeechToTextPlugin.swift:262
#8 (null) in thunk for @escaping @callee_guaranteed () -> () ()
#9 (null) in _dispatch_call_block_and_release ()
#10 (null) in _dispatch_client_callout ()
#11 (null) in _dispatch_main_queue_callback_4CF ()
#12 (null) in CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE ()
#13 (null) in __CFRunLoopRun ()
#14 (null) in CFRunLoopRunSpecific ()
#15 (null) in CFRunLoopRunInMode ()
#16 (null) in GSEventRunModal ()
#17 (null) in UIApplicationMain ()

Gradle error API 'variant.getMergeAssets()' is obsolete

I tried to build the project it gave me this errors

WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
It will be removed at the end of 2019.

and this one too

WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
It will be removed at the end of 2019.

Any help in this please ?

How to know when plugin is done listening and has a result

I'm aware that you can pass the onResultfunction in the listen method to the plugin. But that function is executed every time the plugin recognize words.

The thing that I want to do is execute a function when the plugin is all done with listening and recognizing. In fact, when the plugin reproduces the done audio in Android would be the perfect moment to execute a function.

Is there a way of doing this that I'm not aware of?

If that's possible, I think it would be helpful add it to the README for future reference to anyone with the same problem that I have.

Thanks

Build failed: Swift Compiler Error (Flutter 1.12)

I created a new Flutter project to test the package using the pub.dev example code. I saw that other issues mentioned iOS >=10, and Swift 5, so I modified Podfile with platform :ios, '13.2' and config.build_settings['SWIFT_VERSION'] = '5'. However, I get Swift complier errors. I'm guessing that I've missed something, but perhaps there is an issue.

Any help would be appreciated. Thanks for the package!

flutter doctor output:

/Users/markvandergon/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.3 19D76, locale en-US)
    • Flutter version 1.12.13+hotfix.8 at /Users/markvandergon/flutter
    • Framework revision 0b8abb4724 (5 weeks ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/markvandergon/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Users/markvandergon/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/192.6241897/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.9.1

[✓] Android Studio (version 3.6)
    • Android Studio at /Users/markvandergon/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/192.6241897/Android Studio.app/Contents
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] Connected device (1 available)
    • iPhone 11 Pro Max • 3F26DBDF-B967-49F4-8BF9-1D59768BDF74 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)

Error:

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                            5.6s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/markvandergon/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-1.1.0/ios/Classes/SwiftSpeechToTextPlugin.swift:224:44: error: value of type 'SwiftSpeechToTextPlugin' has no member 'AVAudioSession'
                rememberedAudioCategory = self.AVAudioSession.Category
                                          ~~~~ ^~~~~~~~~~~~~~
    /Users/markvandergon/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-1.1.0/ios/Classes/SwiftSpeechToTextPlugin.swift:227:63: error: type 'Int' has no member 'notifyOthersOnDeactivation'
                try self.audioSession.setActive(true, withFlags: .notifyOthersOnDeactivation)
                                                                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/markvandergon/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-1.1.0/ios/Classes/SwiftSpeechToTextPlugin.swift:245:9: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
            catch {
            ^
    note: Using new build system
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

Example doesn't work on Samsung Galaxy S7 SM-G930F

Hello,

The example provided here doesn't work on my Samsung Galaxy S7 SM-G930F(Android 8.0.0). When I press the Start button and speak there is no recognized word or error shown.

I suppose the example should work on my device, so do you have any idea how could I find the source of the problem?

Update: I was able to test the same app on a Samsung Galaxy A5 2016 SM-A510F(Android 7.0) and the recognition works on that device.

Without noticing the listening event, speech.isListening does not work.

Hi admins. I'm using your package for my project. I detected a occur when speech listening. That is when I don't speak anything, I received twice onError (I set print() inside onError). And I notice that this error occurs after I run for the second time onwards. I don't know how to explain it to you, sort of it doesn't get stopped listening. Or you can test with your example project, with your example I see Text("I'm listening...", style: TextStyle(fontWeight: FontWeight.bold),) instead of Text("Not listening", style: TextStyle(fontWeight: FontWeight.bold),).
So, I hope you can understand occur which I am getting, and help me to solve it. Thanks for your reading.

inCompatible with Honor 10

ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'java.lang.String android.content.Intent.resolveTypeIfNeeded(android.content.ContentResolver)' on a null object reference, null)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.