Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Added mp3 files to be played when calling soundplay_noticiation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rumsie-Grimshaw committed Jun 11, 2024
1 parent 4fde641 commit 8ad8166
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ def send_to_ide():
code = request.get_json().get("code_snippet")
unescaped_code = html.unescape(code)
if utils.send_code_snippet_to_ide(filename, unescaped_code):
utils.playsound_notification("capture_success_tone.wav")
utils.playsound_notification("success.mp3")
return "success"
else:
utils.playsound_notification("capture_fail_tone.wav")
utils.playsound_notification("error.mp3")
return "fail"


Expand Down
4 changes: 2 additions & 2 deletions app/extract_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def extract_code_at_timestamp(filename: str, timestamp: float) -> str:
:param timestamp: Time stamp of the frame to extract
:return: Formatted code as a string
"""
utils.playsound_notification("capture_tone.wav")
utils.playsound_notification("capture.mp3")
frame = ExtractText.extract_frame_at_timestamp(filename, timestamp)
if frame is not None:
extracted_text = pytesseract.image_to_string(frame)
Expand All @@ -52,7 +52,7 @@ def format_raw_ocr_string(extracted_text: str) -> str:
formatted_text = formatted_text.replace("```", "")
if config("Formatting", "remove_language_name"):
formatted_text = formatted_text.replace(language, "", 1)
utils.playsound_notification("capture_success_tone.wav")
utils.playsound_notification("success.mp3")
return formatted_text

@staticmethod
Expand Down
Binary file added app/static/audio/capture.mp3
Binary file not shown.
Binary file added app/static/audio/error.mp3
Binary file not shown.
Binary file added app/static/audio/success.mp3
Binary file not shown.

0 comments on commit 8ad8166

Please sign in to comment.