From a55e94a54a16dd54181d736e6c936a04f278fd5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Volhejn?= Date: Thu, 26 Jun 2025 16:36:32 +0200 Subject: [PATCH] Address review comments --- configs/config-stt-en-hf.toml | 2 +- configs/config-stt-en_fr-hf.toml | 2 +- scripts/transcribe_from_file_via_rust_server.py | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configs/config-stt-en-hf.toml b/configs/config-stt-en-hf.toml index 5eaf7c6..75382f8 100644 --- a/configs/config-stt-en-hf.toml +++ b/configs/config-stt-en-hf.toml @@ -1,7 +1,7 @@ static_dir = "./static/" log_dir = "$HOME/tmp/tts-logs" instance_name = "tts" -authorized_ids = ["open_token"] +authorized_ids = ["public_token"] [modules.asr] path = "/api/asr-streaming" diff --git a/configs/config-stt-en_fr-hf.toml b/configs/config-stt-en_fr-hf.toml index e2fdf96..15a880f 100644 --- a/configs/config-stt-en_fr-hf.toml +++ b/configs/config-stt-en_fr-hf.toml @@ -1,7 +1,7 @@ static_dir = "./static/" log_dir = "$HOME/tmp/tts-logs" instance_name = "tts" -authorized_ids = ["open_token"] +authorized_ids = ["public_token"] [modules.asr] path = "/api/asr-streaming" diff --git a/scripts/transcribe_from_file_via_rust_server.py b/scripts/transcribe_from_file_via_rust_server.py index d3af0f4..9333ca9 100644 --- a/scripts/transcribe_from_file_via_rust_server.py +++ b/scripts/transcribe_from_file_via_rust_server.py @@ -18,7 +18,6 @@ import websockets SAMPLE_RATE = 24000 FRAME_SIZE = 1920 # Send data in chunks -HEADERS = {"kyutai-api-key": "open_token"} def load_and_process_audio(file_path): @@ -130,4 +129,7 @@ if __name__ == "__main__": print() print() - print(transcript) + for word in transcript: + print( + f"{word['timestamp'][0]:7.2f} -{word['timestamp'][1]:7.2f} {word['text']}" + )