Spaces:
Running
Running
LOL FORGOR CONFIG IMPORT IN RECOGNIZE PATH
Browse files- app.py +1 -1
- routes/witaiApi/recognizeVoice.py +3 -0
- routes/ytApi/getPreview.py +1 -1
app.py
CHANGED
@@ -84,7 +84,7 @@ def getBMPreview(): return osuApi.getPreview(request)
|
|
84 |
def getBMFull(): return osuApi.getFull(request)
|
85 |
|
86 |
if __name__ == "__main__":
|
87 |
-
VERSION = '1.0
|
88 |
|
89 |
config = configFile()
|
90 |
with open(config['config-path'], "w") as outfile:
|
|
|
84 |
def getBMFull(): return osuApi.getFull(request)
|
85 |
|
86 |
if __name__ == "__main__":
|
87 |
+
VERSION = '1.0 build79'
|
88 |
|
89 |
config = configFile()
|
90 |
with open(config['config-path'], "w") as outfile:
|
routes/witaiApi/recognizeVoice.py
CHANGED
@@ -29,6 +29,9 @@ def recognizeVoice(request):
|
|
29 |
elif fileExt == ".ogg": fileHeader = {'Content-Type': 'audio/ogg'}
|
30 |
elif fileExt == '.aac': fileHeader = {'Content-Type': 'audio/wav'}
|
31 |
else: return {"status": "error", "details": { "error_code": 111, "error_details": "Wrong file format (only ogg, wav, mp3)" }}
|
|
|
|
|
|
|
32 |
wget.download(url, f"{config['temp-path']}/{fileId}{fileExt}")
|
33 |
noEx = True
|
34 |
if fileExt == ".aac":
|
|
|
29 |
elif fileExt == ".ogg": fileHeader = {'Content-Type': 'audio/ogg'}
|
30 |
elif fileExt == '.aac': fileHeader = {'Content-Type': 'audio/wav'}
|
31 |
else: return {"status": "error", "details": { "error_code": 111, "error_details": "Wrong file format (only ogg, wav, mp3)" }}
|
32 |
+
|
33 |
+
config = helpers.configFile()
|
34 |
+
|
35 |
wget.download(url, f"{config['temp-path']}/{fileId}{fileExt}")
|
36 |
noEx = True
|
37 |
if fileExt == ".aac":
|
routes/ytApi/getPreview.py
CHANGED
@@ -18,7 +18,7 @@ def getPreview(request):
|
|
18 |
try:
|
19 |
if request.method == 'POST': duration = request.form['duration']
|
20 |
else: duration = request.args['duration']
|
21 |
-
if duration
|
22 |
except: duration = 30
|
23 |
|
24 |
try:
|
|
|
18 |
try:
|
19 |
if request.method == 'POST': duration = request.form['duration']
|
20 |
else: duration = request.args['duration']
|
21 |
+
if duration >= 60: duration = 60
|
22 |
except: duration = 30
|
23 |
|
24 |
try:
|