Skip to content

Commit

Permalink
feat: 6.6.0 doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sowens-csd committed Jan 30, 2024
1 parent 34a0120 commit 9c82908
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
6 changes: 5 additions & 1 deletion speech_to_text/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Changelog

## 6.6.0-dev
## 6.6.0

### New
* `listen` now has a new `SpeechListenOptions listenOptions` parameter to specify the recognizer
options for the listen session. Some of the separate parameters have been deprecated as a
result. See the `listen` method for documentation.
* `SpeechListenOptions.enableHapticFeedback` is a new option which allows haptic feedback during
speech recognition on iOS. Usually haptics are disabled to avoid interfering with the microphone.
* `SpeechListenOptions.autoPunctuation` is a new option which turns on automatic punction inference
during speech recognition on iOS.

## 6.5.1

Expand Down
8 changes: 4 additions & 4 deletions speech_to_text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,16 @@ a simple UI. This is probably the first example to look at to understand how to
If you are using the (Provider)[https://pub.dev/packages/provider] package in Flutter then this example shows how
to use the plugin as a provider throught the `SpeechToTextProvider` class.

#### Audio player interaction ([examples/audio_player_interaction/lib/main.dart](https://github.com/csdcorp/speech_to_text/blob/main/examples/audio_player_interaction/lib/main.dart))
A common use case is to have this plugin and an audio playback plugin working together. This example shows one
way to make them work well together.

#### Plugin stress test ([example/lib/stress.dart](https://github.com/csdcorp/speech_to_text/blob/main/speech_to_text/example/lib/stress.dart))
The plugin opens and closes several platform resources as it is used. To help ensure that the plugin
does not leak resources this stress test loops through various operations to make it easier to
track resource usage. This is mostly an internal development tool so not as useful for reference
purposes.

#### Audio player interaction ([examples/audio_player_interaction/lib/main.dart](https://github.com/csdcorp/speech_to_text/blob/main/examples/audio_player_interaction/lib/main.dart))
A common use case is to have this plugin and an audio playback plugin working together. This example shows one
way to make them work well together. You can find this in



### Initialize once
Expand Down
12 changes: 7 additions & 5 deletions speech_to_text/lib/speech_to_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,14 @@ class SpeechToText {
Duration? pauseFor,
String? localeId,
SpeechSoundLevelChange? onSoundLevelChange,
@Deprecated('Use listenOptions instead') cancelOnError = false,
@Deprecated('Use listenOptions instead') partialResults = true,
@Deprecated('Use listenOptions instead') onDevice = false,
@Deprecated('Use listenOptions instead')
@Deprecated('Use SpeechListenOptions.cancelOnError instead')
cancelOnError = false,
@Deprecated('Use SpeechListenOptions.partialResults instead')
partialResults = true,
@Deprecated('Use SpeechListenOptions.onDevice instead') onDevice = false,
@Deprecated('Use SpeechListenOptions.listenMode instead')
ListenMode listenMode = ListenMode.confirmation,
@Deprecated('Use listenOptions instead') sampleRate = 0,
@Deprecated('Use SpeechListenOptions.sampleRate instead') sampleRate = 0,
SpeechListenOptions? listenOptions}) async {
if (!_initWorked) {
throw SpeechToTextNotInitializedException();
Expand Down
2 changes: 1 addition & 1 deletion speech_to_text/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: speech_to_text
description: A Flutter plugin that exposes device specific speech to text recognition capability.
version: 6.6.0-dev
version: 6.6.0
homepage: https://github.com/csdcorp/speech_to_text

environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,12 @@ abstract class SpeechToTextPlatform extends PlatformInterface {
///
Future<bool> listen(
{String? localeId,
@deprecated partialResults = true,
@deprecated onDevice = false,
@deprecated int listenMode = 0,
@deprecated sampleRate = 0,
@Deprecated('Use SpeechListenOptions.partialResults instead')
partialResults = true,
@Deprecated('Use SpeechListenOptions.onDevice instead') onDevice = false,
@Deprecated('Use SpeechListenOptions.listenMode instead')
int listenMode = 0,
@Deprecated('Use SpeechListenOptions.sampleRate instead') sampleRate = 0,
SpeechListenOptions? options}) {
throw UnimplementedError('listen() has not been implemented.');
}
Expand Down

0 comments on commit 9c82908

Please sign in to comment.