-
Notifications
You must be signed in to change notification settings - Fork 1.2k
This PR resolves a critical runtime crash during the audio export stage on Linux systems, specifically occurring in Cloud environments like Lightning AI. #1089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
ed95f0e
0457406
7f4b5db
025006e
16be021
6dba85e
da822f3
b5601df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -215,6 +215,10 @@ def save_audio( | |
| Actual saved file path | ||
| """ | ||
| format = (format or self.default_format).lower() | ||
|
|
||
| force_flac = os.getenv("ACESTEP_FORCE_FLAC_EXPORT", "0") == "1" | ||
| if force_flac: | ||
| format = "flac" | ||
|
Comment on lines
+219
to
+221
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forced FLAC can produce extension/content mismatch (e.g., At Line 221, Proposed fix force_flac = os.getenv("ACESTEP_FORCE_FLAC_EXPORT", "0") == "1"
if force_flac:
- format = "flac"
+ format = "flac"
# Ensure output path has correct extension
output_path = Path(output_path)
+ if force_flac and output_path.suffix.lower() != ".flac":
+ output_path = output_path.with_suffix(".flac")Also applies to: 228-240 🧰 Tools🪛 Ruff (0.15.9)[error] 222-222: Variable (A001) 🤖 Prompt for AI Agents |
||
| if format not in ["flac", "wav", "mp3", "wav32", "opus", "aac"]: | ||
| logger.warning(f"Unsupported format {format}, using {self.default_format}") | ||
| format = self.default_format | ||
|
|
@@ -308,8 +312,10 @@ def save_audio( | |
| str(output_path), | ||
| audio_tensor, | ||
| sample_rate, | ||
| channels_first=True, | ||
| channels_first=channels_first, | ||
| #backend="soundfile" #safe dependency | ||
| ) | ||
|
|
||
|
|
||
| logger.debug(f"[AudioSaver] Saved audio to {output_path} ({format}, {sample_rate}Hz)") | ||
| return str(output_path) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.