Spaces:
Runtime error
Runtime error
add temp clearing after successful cut
Browse files- .vscode/settings.json +0 -14
- main.py +2 -2
.vscode/settings.json
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"files.exclude": {
|
3 |
-
"**/.git": true,
|
4 |
-
"**/.svn": true,
|
5 |
-
"**/.hg": true,
|
6 |
-
"**/CVS": true,
|
7 |
-
"**/.DS_Store": true,
|
8 |
-
"**/Thumbs.db": true,
|
9 |
-
"**/.retool_types/**": true,
|
10 |
-
"**/*tsconfig.json": true,
|
11 |
-
".cache": true,
|
12 |
-
"retool.config.json": true
|
13 |
-
}
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main.py
CHANGED
@@ -81,7 +81,7 @@ async def cut_audio(request: CutRequestInput):
|
|
81 |
start, end = segment
|
82 |
logger.debug(f"Processing segment {i}: start={start}, end={end}")
|
83 |
|
84 |
-
output_file = f"/tmp/cut_quote_{i}{cut_request.quote_filename}"
|
85 |
try:
|
86 |
(
|
87 |
ffmpeg
|
@@ -94,7 +94,7 @@ async def cut_audio(request: CutRequestInput):
|
|
94 |
|
95 |
raise HTTPException(status_code=500, detail=str(e))
|
96 |
try:
|
97 |
-
s3_output_key = f'{aws_env}/{cut_request.news_id}/
|
98 |
s3_client.upload_file(output_file, s3_bucket_name, s3_output_key)
|
99 |
except Exception as e:
|
100 |
logger.error(f"S3 Upload Error: {str(e)}")
|
|
|
81 |
start, end = segment
|
82 |
logger.debug(f"Processing segment {i}: start={start}, end={end}")
|
83 |
|
84 |
+
output_file = f"/tmp/cut_quote_{i}_{cut_request.quote_filename}"
|
85 |
try:
|
86 |
(
|
87 |
ffmpeg
|
|
|
94 |
|
95 |
raise HTTPException(status_code=500, detail=str(e))
|
96 |
try:
|
97 |
+
s3_output_key = f'{aws_env}/{cut_request.news_id}/quote_segment_{i}.mp3'
|
98 |
s3_client.upload_file(output_file, s3_bucket_name, s3_output_key)
|
99 |
except Exception as e:
|
100 |
logger.error(f"S3 Upload Error: {str(e)}")
|