Agora FlutterFlow RTT Protobuf
A Flutter package for handling Protobuf messages for Agora's real-time transcription (RTT) features. This package includes Protobuf message classes and utilities to work seamlessly with FlutterFlow and Agora's real-time APIs.
Features
- Protobuff generated SttMessage for use in flutterflow
Installation
To use this package, add it to your pubspec.yaml file:
dependencies:
agora_flutterflow_rtt_protobuf:
git:
url: https://github.com/cuthbert1221/agora_flutterflow_rtt_protobuf.git
ref: main
Then run:
flutter pub get
Usage
Import the package into your Dart project:
import 'package:agora_flutterflow_rtt_protobuf/agora_flutterflow_rtt_protobuf.dart';
void main() {
// Example: Create a message
final message = Message(
vendor: 123,
version: 1,
uid: Int64(456),
);
print('Vendor: ${message.vendor}');
print('Version: ${message.version}');
print('UID: ${message.uid}');
}
Protobuf Message Overview
Message
Represents the primary Protobuf message with fields such as:
vendor: Integer representing the vendor ID.version: Integer for message versioning.uid: Unique identifier (Int64).
Word
Handles individual words within a transcription:
text: The word as a string.startMs: Start time in milliseconds.durationMs: Duration of the word in milliseconds.confidence: Confidence level of the transcription.
Translation
Handles translated text for multiple languages:
lang: Language code for the translation.texts: List of translated strings.isFinal: Boolean indicating if the translation is final.
Protobuf Generation
To regenerate the Protobuf message classes, ensure protoc is installed and run:
protoc --dart_out=lib/src/ *.proto
Testing
To run the tests for this package:
flutter test
Contributing
Contributions are welcome! Please fork the repository and submit a pull request.
License
This package is distributed under the MIT License.
Contact
For questions or suggestions, feel free to open an issue at https://github.com/cuthbert1221/agora_flutterflow_rtt_protobuf.