speech_to_text_ultra

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

speech to text ultra

Author #
Souvik Das
Link to Profile
Speech To Text Ultra #
This Flutter package designed to address the inconvenience of sudden pauses during speech recognition.
With manual control over pause and play functionality, users can now dictate paragraphs without interruptions, ensuring a
seamless and uninterrupted speech recognition experience. Elevate your Flutter applications with improved speech interaction,
empowering users to communicate effortlessly and effectively.
Installation #

Add the latest version of package to your pubspec.yaml (and rundart pub get):

dependencies:
speech_to_text_ultra: ^0.0.3
copied to clipboard

Import the package and use it in your Flutter App.

import 'package:speech_to_text_ultra/speech_to_text_ultra.dart';
copied to clipboard
Example #



class SpeechToTextUltraWidgetImplementation extends StatefulWidget {
const SpeechToTextUltraWidgetImplementation({super.key});

@override
State<SpeechToTextUltraWidgetImplementation> createState() => _SpeechToTextUltraWidgetImplementationState();
}

class _SpeechToTextUltraWidgetImplementationState extends State<SpeechToTextUltraWidgetImplementation> {
bool mIsListening = false;
String mEntireResponse = '';
String mLiveResponse = '';

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: Colors.teal,
centerTitle :true,
title: const Text('Speech To Text Ultra',style: TextStyle(fontSize: 20,fontWeight: FontWeight.w500),),
),
body: Center(
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
mIsListening
? Text('$mEntireResponse $mLiveResponse')
: Text(mEntireResponse),
const SizedBox(height: 20),
SpeechToTextUltra(
ultraCallback:
(String liveText, String finalText, bool isListening) {
setState(() {
mLiveResponse = liveText;
mEntireResponse = finalText;
mIsListening = isListening;
});
},
// toPauseIcon: const Icon(Icons.pause),
// toStartIcon: const Icon(Icons.mic),
// pauseIconColor: Colors.black,
// startIconColor: Colors.black,
),
const SizedBox(
height: 10,
),
],
),
),
),
);
}
}

copied to clipboard



User Permissions Requirements: #
For applications utilizing this plugin, it is necessary to ensure appropriate user permissions are set. Below are the steps to configure permissions for both iOS and Android platforms:
iOS:
In your iOS project, add the following keys to your Info.plist file located in <project root>/ios/Runner/Info.plist:
<key>NSSpeechRecognitionUsageDescription</key>
<string>In order to perform voice-based tasks, this app requires permission to recognize recorded audio.</string>
<key>NSMicrophoneUsageDescription</key>
<string>In order to perform voice-based tasks, this app requires permission to access the microphone.</string>
copied to clipboard


NSSpeechRecognitionUsageDescription: Provide a description explaining why your app requires speech recognition access. This corresponds to "Privacy - Speech Recognition Usage Description" in the visual editor.


NSMicrophoneUsageDescription: Provide a description detailing why your app needs access to the microphone. This corresponds to "Privacy - Microphone Usage Description" in the visual editor.


These keys and descriptions are necessary for requesting user permission to access the photo library and enable speech recognition within your application.
Android:
In your Android project, add the following permissions to your AndroidManifest.xml file located in <project root>/android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
copied to clipboard


android.permission.RECORD_AUDIO: This permission is essential for microphone access.


android.permission.INTERNET: This permission is necessary because speech recognition may utilize remote services.


android.permission.BLUETOOTH: This permission is required as speech recognition may utilize Bluetooth headsets when connected.


android.permission.BLUETOOTH_ADMIN: This permission is necessary for utilizing Bluetooth headsets during speech recognition.


android.permission.BLUETOOTH_CONNECT: This permission is essential for utilizing Bluetooth headsets during speech recognition.


These permissions are essential for enabling microphone access, utilizing remote services, and using Bluetooth functionalities required for speech recognition within your application.
By following these guidelines, you ensure your application adheres to the necessary permissions required for seamless operation of the speech recognition functionality across both iOS and Android platforms.
Optional Parameters #

toPauseIcon: Default value is set to an Icon with the pause symbol.
This parameter allows customization of the icon displayed when the action changes to pause. By default, it's set to an Icon with the pause symbol.
toStartIcon: Default value is set to an Icon with the microphone symbol.
This parameter enables customization of the icon displayed when the action changes to start or listen. By default, it's set to an Icon with the microphone symbol.
pauseIconColor: Default color is set to black.
This parameter lets you specify the color of the pause icon.The default color is black.
startIconColor: Default color is set to black.
This parameter allows you to define the color of the start or listen icon. The default color is black.

Utilizing the Loading State:
By utilizing the isListening variable through the callback, you can dynamically change the loading state. This enables you to incorporate any animation or specific widget logic that you require during the loading state. For instance, you can add animations, progress indicators, or any widget-specific logic to enhance user experience during the loading phase.
Features #

Seamlessly pause and resume speech recognition manually for uninterrupted dictation.
Eliminate sudden pauses during speech input, ensuring smooth and uninterrupted interactions.
Empower users to dictate entire paragraphs without interruptions or breaks.
Enhance user experience by providing manual control over speech recognition pause/play functionality.
Streamline speech input in Flutter applications with intuitive pause and play features.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.