Skip to content

Commit 964f16e

Browse files
remove prints
1 parent 59fbc21 commit 964f16e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/audiotools/speech.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ async def transcribe_whisper(path):
107107

108108
def transcribe(path, api_key, backend="wit"):
109109
if backend == "wit":
110-
print("Transcribing with wit")
110+
logging.debug("Transcribing with wit")
111111
return transcribe_wit(path, api_key)
112112

113113
elif backend == "whisper":
114-
print("Transcribing with whisper")
114+
logging.debug("Transcribing with whisper")
115115
return transcribe_whisper(os.path.basename(path))
116116

117117
raise ValueError("Unknown backend: %s" % backend)

src/transcriberbot/blueprints/voice.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def stop_task(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
6262
if task is not None:
6363
task.cancel()
6464
else:
65-
print("Task not found")
65+
logging.warning("Task not found")
6666

6767

6868
async def process_media_voice(update: Update, context: ContextTypes.DEFAULT_TYPE, media: [Voice | VideoNote | Document],
@@ -125,7 +125,7 @@ async def transcribe_audio_file(update: Update, context: ContextTypes.DEFAULT_TY
125125

126126
try:
127127
async for idx, speech, n_chunks in audiotools.transcribe(path, api_key):
128-
print(f"Transcription idx={idx} n_chunks={n_chunks}, text={speech}")
128+
logging.debug(f"Transcription idx={idx} n_chunks={n_chunks}, text={speech}")
129129
suffix = f" <b>[{idx + 1}/{n_chunks}]</b>" if idx < n_chunks - 1 else ""
130130
reply_markup = keyboard if idx < n_chunks - 1 else None
131131

0 commit comments

Comments
 (0)