stt_recorder_platform_interface
Platform contract for the stt_recorder federated plugin.
Exposed contract
Implementations must support:
partialTextStream()startCapture({required String localeId})stopCapture()returning aVoiceCaptureArtifactcancelCapture()
Artifact contract
VoiceCaptureArtifact is the cross-platform result returned by stopCapture().
Implementations must provide:
bytesfileNamemimeType
path is optional and should only be set when the platform has a stable native
file path to expose.
Implementing a new platform
- Create a package that depends on this package.
- Extend
SttRecorderPlatform. - Set your implementation with
SttRecorderPlatform.instance = YourImplementation(). - Register it as an endorsed implementation in the front package.