Skip to content

Commit

Permalink
Catching no ffmpeg exception
Browse files Browse the repository at this point in the history
  • Loading branch information
SevaSk committed Jun 3, 2023
1 parent 54f98f8 commit 579fdc9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManage
```
Once Chocolatey is installed, you can install FFmpeg by running the following command in your PowerShell:
```
choco install ffmpeg-full
choco install ffmpeg
```
Please ensure that you run these commands in a PowerShell window with administrator privileges. If you face any issues during the installation, you can visit the official Chocolatey and FFmpeg websites for troubleshooting.

Expand Down
7 changes: 7 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import torch
import sys
import TranscriberModels
import subprocess

def write_in_textbox(textbox, text):
textbox.delete("0.0", "end")
Expand Down Expand Up @@ -65,6 +66,12 @@ def create_ui_components(root):
return transcript_textbox, response_textbox, update_interval_slider, update_interval_slider_label, freeze_button

def main():
try:
subprocess.run(["ffmpeg", "-version"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except FileNotFoundError:
print("ERROR: The ffmpeg library is not installed. Please install ffmpeg and try again.")
return

root = ctk.CTk()
transcript_textbox, response_textbox, update_interval_slider, update_interval_slider_label, freeze_button = create_ui_components(root)

Expand Down

0 comments on commit 579fdc9

Please sign in to comment.