TenzinGayche commited on
Commit
af8ad34
·
1 Parent(s): 2bc532e

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +10 -0
handler.py CHANGED
@@ -9,6 +9,15 @@ from num2tib.core import convert
9
  from num2tib.core import convert2text
10
  import re
11
  converter = pyewts.pyewts()
 
 
 
 
 
 
 
 
 
12
  def replace_numbers_with_convert(sentence, wylie=True):
13
  pattern = r'\d+(\.\d+)?'
14
  def replace(match):
@@ -27,6 +36,7 @@ speaker_embeddings = {
27
 
28
  }
29
 
 
30
  replacements = [
31
  ('_', '_'),
32
  ('*', 'v'),
 
9
  from num2tib.core import convert2text
10
  import re
11
  converter = pyewts.pyewts()
12
+ import requests
13
+
14
+ def download_file(url, destination):
15
+ response = requests.get(url)
16
+ with open(destination, 'wb') as file:
17
+ file.write(response.content)
18
+
19
+ # Example usage:
20
+ download_file('https://huggingface.co/openpecha/speecht5-tts-01/resolve/main/female_2.npy', 'female_2.npy')
21
  def replace_numbers_with_convert(sentence, wylie=True):
22
  pattern = r'\d+(\.\d+)?'
23
  def replace(match):
 
36
 
37
  }
38
 
39
+
40
  replacements = [
41
  ('_', '_'),
42
  ('*', 'v'),