සිංLingua Library has the capability to facilitate the conversion of Sinhala audio into text transcripts. This utilizes the sinhala_audio package to perform audio-to-text conversion and provides a simple interface for users to transcribe Sinhala audio files.
The library provides two methods to convert Sinhala audio into text: one using a file path and another by taking user input for the audio file. Here’s how you can use them:
The library provides a function named conversion() to convert Sinhala audio into text. Here’s how you can use it:
from sinhala_data_processor.sinhala_audio.audio_to_text import conversion
audio_path = "path/to/audio/file.wav"
transcript = conversion(path=audio_path)
print(transcript)
The library provides a function named conversion_by_input() to convert Sinhala audio into text. Here’s how you can use it:
from sinhala_data_processor.sinhala_audio.audio_to_text import conversion_by_input
transcript = conversion_by_input()
print(transcript)
Here’s an example of how you can use the library to convert a Sinhala audio file to text using both methods:
from sinhala_data_processor.sinhala_audio.audio_to_text import conversion, conversion_by_input
# Method 1: Conversion from file path
audio_path = "path/to/audio/file.wav"
transcript = conversion(path=audio_path)
print(transcript)
# Method 2: Conversion by user input
transcript = conversion_by_input()
print(transcript)
both the conversion() function and the conversion_by_input() function, demonstrating two different ways users can convert Sinhala audio into text transcripts using සිංLingua library.