Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions rvcgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import soundfile as sf
import tkinter as tk
import customtkinter as ctk
import pathlib

import os
import sys
Expand Down Expand Up @@ -63,15 +64,15 @@ def extract_model_from_zip(zip_path, output_dir):


def play_audio(file_path):
audio_file = pathlib.Path(file_path).absolute()
if sys.platform == 'win32':
audio_file = os.path.abspath(file_path)
subprocess.call(['start', '', audio_file], shell=True)
elif sys.platform == 'darwin':
audio_file = 'path/to/audio/file.wav'
subprocess.call(['open', audio_file])
elif sys.platform == 'linux':
audio_file = 'path/to/audio/file.wav'
subprocess.call(['xdg-open', audio_file])
else:
raise ValueError(f'Unexpected platform {sys.platform}')

def get_full_path(path):
return os.path.abspath(path)
Expand Down