Compare commits
No commits in common. "d13b0f92c3137b8e0f6579c4864940c545c1b27d" and "6c9da444da0fcc52d294cb8c2700cce4585b1d48" have entirely different histories.
d13b0f92c3
...
6c9da444da
@ -1,8 +1,5 @@
|
|||||||
pyaml
|
|
||||||
librosa
|
|
||||||
openai-whisper
|
openai-whisper
|
||||||
#https://pytorch.org/get-started/locally/
|
#https://pytorch.org/get-started/locally/
|
||||||
--extra-index-url https://download.pytorch.org/whl/cu128
|
torch==2.5.1
|
||||||
torch
|
torchvision==0.20.1
|
||||||
torchvision
|
torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
|
||||||
torchaudio
|
|
||||||
@ -19,23 +19,6 @@ with open("transcription_config.yml", "r", encoding="utf-8") as file:
|
|||||||
settings = yaml.safe_load(file)
|
settings = yaml.safe_load(file)
|
||||||
folder_list = settings.get("folder_list")
|
folder_list = settings.get("folder_list")
|
||||||
model_name = settings.get("model_name")
|
model_name = settings.get("model_name")
|
||||||
gpu_only = settings.get("gpu_only", False)
|
|
||||||
|
|
||||||
print("PyTorch version:", torch.__version__)
|
|
||||||
print("CUDA available?", torch.cuda.is_available())
|
|
||||||
print("CUDA version:", torch.version.cuda)
|
|
||||||
print("GPU count:", torch.cuda.device_count())
|
|
||||||
if torch.cuda.is_available():
|
|
||||||
for i in range(torch.cuda.device_count()):
|
|
||||||
print(f" Device {i}:", torch.cuda.get_device_name(i))
|
|
||||||
|
|
||||||
if not folder_list or not model_name:
|
|
||||||
print("Error: Please check the transcription_config.yml file. It should contain 'folder_list' and 'model_name'.")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if gpu_only and not torch.cuda.is_available():
|
|
||||||
print("Error: You requested to only use GPU but it is not available. Please check your PyTorch installation.")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def load_audio_librosa(path: str, sr: int = 16_000) -> np.ndarray:
|
def load_audio_librosa(path: str, sr: int = 16_000) -> np.ndarray:
|
||||||
audio, orig_sr = librosa.load(path, sr=sr) # load + resample to 16 kHz
|
audio, orig_sr = librosa.load(path, sr=sr) # load + resample to 16 kHz
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user