Enable timestamps for transcripted text
Add `--enable-timestamps` option to `run_client.py` script to print out transcripted text with timestamps. Sample output with translation enabled: ``` [0.000 -> 7.440] And so, my fellow Americans, ask not what your country can do for you. [7.440 -> 10.300] Ask what you can do for your country. TRANSLATION to fr: [0.000 -> 7.440] Et donc, mes camarades américains, ne demandez pas ce que votre pays peut faire pour vous. [7.440 -> 10.300] Demandez ce que vous pouvez faire pour votre pays. ``` Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
This commit is contained in:
@@ -47,6 +47,9 @@ if __name__ == '__main__':
|
||||
type=str,
|
||||
default='fr',
|
||||
help='Target language for translation, e.g., "fr" for French.')
|
||||
parser.add_argument('--enable_timestamps',
|
||||
action='store_true',
|
||||
help='Show transcription with timestamps')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -80,5 +83,6 @@ if __name__ == '__main__':
|
||||
mute_audio_playback=args.mute_audio_playback, # Only used for file input, False by Default
|
||||
enable_translation=args.enable_translation, # Enable translation of the transcription output
|
||||
target_language=args.target_language, # Target language for translation, e.g., "fr
|
||||
enable_timestamps=args.enable_timestamps,
|
||||
)
|
||||
client(f)
|
||||
|
||||
Reference in New Issue
Block a user