Closed VewMet closed 1 week ago
kindly check the issue we have raised for the same and can close once this PR get's merged. Thanks Jitsi Team for awesome project. https://github.com/jitsi/jigasi/issues/505
Sorry for the late attentiuon but @VewMet: Hi, thanks for your contribution! If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would, unfortunately, be unable to merge your patch unless we have that piece :(.
Will close in favor of https://github.com/jitsi/jigasi/pull/553
Description
This PR adds UTF-8 encoding support for SEND JSON POST requests in the transcription module of Jigasi.
org.jitsi.jigasi.transcription.SEND_JSON_REMOTE_URLS=https://ts.meet.jit.si/transcriptions
This ensures proper handling of non-ASCII characters, especially for languages like Hindi, Tamil, Japanese, etc.
Changes:
Explicitly set the Content-Type header to application/json; charset=UTF-8 to indicate that the JSON data is UTF-8 encoded. Modified the byte conversion of the JSON string to use UTF-8 encoding.
Change-1:
To:
Change-2:
To:
Motivation:
While the transcriptions worked well in English, issues arose when changing the language to Hindi or others. The received text contained numerous question marks, indicating an encoding issue. By ensuring the data is sent using UTF-8 encoding, this PR aims to resolve such issues and ensure the correct interpretation of non-ASCII characters.
Testing:
Tested the transcription feature with multiple languages, including Hindi, Tamil, and Japanese. Verified that the JSON POST requests in jigasi sip-communicator.properties are being sent with the correct UTF-8 encoding.
org.jitsi.jigasi.transcription.SEND_JSON_REMOTE_URLS=https://ts.meet.jit.si/transcriptions
Impact:
This change ensures that Jigasi can handle transcription for a wide variety of languages without any encoding-related issues, enhancing its versatility and robustness.
Additional Notes (if any):
Mention any related issues, potential side effects, or further improvements that can be made.