[Bugfix][Multimodal] Normalize single-channel audio to 1D (#56691)
Signed-off-by: Ylean <61880605+Woolgathererer@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
co-authored by
Codex
Cyrus Leung
parent
18f8f96025
commit
0872ddf4b9
@@ -146,7 +146,7 @@ def normalize_audio(
|
||||
|
||||
# No reduction needed if already at target
|
||||
if num_channels == spec.target_channels:
|
||||
return audio
|
||||
return audio[0] if num_channels == 1 else audio
|
||||
|
||||
# Cannot expand channels
|
||||
if num_channels < spec.target_channels:
|
||||
|
||||
Reference in New Issue
Block a user