Last updated:
0 purchases
flutter azure speech
flutter_azure_speech #
Flutter implementation of Microsoft Azure Speech service
Speech to Text [Done]
Text to Speech [InProgress]
Getting Started #
Initialise the framework with your Region and Subscription key
Future<void> _initializeSpeechRecognition() async {
try {
await _flutterAzureSpeechPlugin.initialize(
"YOUR SUBSCRIPTION KEY", "YOUR REGION");
} catch (e) {
print('Error initializing speech recognition: $e');
}
}
copied to clipboard
Speech to Text #
Start the speech recognition process by calling the getSpeechToText method.
Future<void> _startSpeechRecognition() async {
try {
setState(() {
_recognizedText = "Listening...";
});
String recognizedText =
await _flutterAzureSpeechPlugin.getSpeechToText("zh-CN") ?? "";
setState(() {
_recognizedText = recognizedText;
});
} catch (e) {
print('Error during speech recognition: $e');
setState(() {
_recognizedText = "An error occurred during speech recognition.";
});
}
}
copied to clipboard
Text to Speech #
[InProgress]
示例截图 #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.