AgoraIO / Docs-Source

A repository for the Agora Docs source content.
MIT License
20 stars 11 forks source link

how to parse RTT onStreamMessage callback to get text #1447

Closed Nirav-Sanghani closed 2 weeks ago

Nirav-Sanghani commented 1 year ago

in this doc

https://docs-beta.agora.io/en/real-time-transcription/get-started/#use-google-protobuf-generator-to-parse-text-data

it is mention that "When transcription text is available, your app receives the onStreamMessage callback." i am getting call back but it is not clearly mention how to parse callback to get text. i have generated proto file and also generated javascript file form .proto file but do not know how to handle callback

i am working on react native if you have any example code then i need it urgent as our broadcast application is live but caption is missing.

EkaanshArora commented 1 year ago

Hey here's an example, does this help?

Nirav-Sanghani commented 1 year ago

@EkaanshArora i am getting garbage value in "data.toString()"

below is log for text i am getting when speaking hello testing is there any way to remove garbage value

Receive from uid:12345 StreamId 49153: � H�vR hello testingR .`�j transcribezen-US