Afrinetwork7 commited on
Commit
10fc892
1 Parent(s): 93c1403

Update asr.py

Browse files
Files changed (1) hide show
  1. asr.py +6 -0
asr.py CHANGED
@@ -9,6 +9,12 @@ ASR_SAMPLING_RATE = 16_000
9
  CHUNK_LENGTH_S = 60 # Increased to 60 seconds per chunk
10
  MAX_CONCURRENT_CHUNKS = 4 # Adjust based on VRAM availability
11
 
 
 
 
 
 
 
12
  MODEL_ID = "facebook/mms-1b-all"
13
 
14
  processor = AutoProcessor.from_pretrained(MODEL_ID)
 
9
  CHUNK_LENGTH_S = 60 # Increased to 60 seconds per chunk
10
  MAX_CONCURRENT_CHUNKS = 4 # Adjust based on VRAM availability
11
 
12
+ ASR_LANGUAGES = {}
13
+ with open(f"data/asr/all_langs.tsv") as f:
14
+ for line in f:
15
+ iso, name = line.split(" ", 1)
16
+ ASR_LANGUAGES[iso.strip()] = name.strip()
17
+
18
  MODEL_ID = "facebook/mms-1b-all"
19
 
20
  processor = AutoProcessor.from_pretrained(MODEL_ID)