File size: 1,319 Bytes
6fd5ec9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: Automatic Speech Recognition Speech To Text
emoji: ๐Ÿ”Š๐Ÿ”„๐Ÿ“
colorFrom: red
colorTo: yellow
sdk: gradio
sdk_version: 5.26.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: Automatic-Speech-Recognition-Speech-to-Text
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

# Clone repository
git clone https://huggingface.co/spaces/hchcsuim/Automatic-Speech-Recognition-Speech-to-Text
cd Automatic-Speech-Recognition-Speech-to-Text

# windows ๅฎ‰่ฃ ffmpeg
https://ffmpeg.org/download.html
ไธ‹่ผ‰็‰ˆๆœฌ ffmpeg-git-full.7z
่งฃๅฃ“็ธฎๅˆฐ C:\ffmpeg
ๅŠ ๅ…ฅ็’ฐๅขƒ่ฎŠๆ•ธ ็ณป็ตฑ่ฎŠๆ•ธ path C:\ffmpeg\bin

# ่ฆๅœจ้›ป่…ฆ็’ฐๅขƒๅ…ˆๅฎ‰่ฃ python 3.10

# Create and activate Python environment
python -m venv env
source env/bin/activate # for linux
env\Scripts\activate # for windows

# ๆˆ–่€…ๅœจ vscode ๆ‰‹ๅ‹•ๅˆ‡ๆ›้ ่จญ็’ฐๅขƒ
Ctrl+Shift+P
Python: Select Interpreter

# Install dependencies
# requirements.txt is for Hugging Face Spaces
pip install -r requirements_local.txt

# ้ฉ—่ญ‰ GPU ๆ”ฏๆด
(env_new) C:\Users\user\Automatic-Speech-Recognition-Speech-to-Text>python
import torch
print(f"CUDA available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
    print(f"GPU: {torch.cuda.get_device_name(0)}")

# Run the app
python app.py