Staticaliza commited on
Commit
68e4bce
ยท
verified ยท
1 Parent(s): 992ce8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -12,10 +12,13 @@ if DEVICE == "auto":
12
  print(f"[SYSTEM] | Using {DEVICE} type compute device.")
13
 
14
  # Variables
 
15
  CHAR_LIMIT = 2000
 
16
  DEFAULT_INPUT = ""
17
  DEFAULT_VOICE = "af_heart"
18
 
 
19
  CHOICES = {
20
  "๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿšบ Heart โค๏ธ": "af_heart",
21
  "๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿšบ Bella ๐Ÿ”ฅ": "af_bella",
@@ -65,7 +68,7 @@ footer {
65
  '''
66
 
67
  # Functions
68
- def trim_silence(audio, threshold=0.1):
69
  abs_audio = np.abs(audio)
70
  indices = np.where(abs_audio > threshold)[0]
71
 
 
12
  print(f"[SYSTEM] | Using {DEVICE} type compute device.")
13
 
14
  # Variables
15
+ SILENT_THRESHOLD = 0.1
16
  CHAR_LIMIT = 2000
17
+
18
  DEFAULT_INPUT = ""
19
  DEFAULT_VOICE = "af_heart"
20
 
21
+
22
  CHOICES = {
23
  "๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿšบ Heart โค๏ธ": "af_heart",
24
  "๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿšบ Bella ๐Ÿ”ฅ": "af_bella",
 
68
  '''
69
 
70
  # Functions
71
+ def trim_silence(audio, threshold=SILENT_THRESHOLD):
72
  abs_audio = np.abs(audio)
73
  indices = np.where(abs_audio > threshold)[0]
74