Skip to content

loading audio data from an array #35

Description

@DKiyanov

moss_transcribe_diarize\inference_utils.py
def process_audio_info
Judging by the code, the ability to load audio data from an array was intended, but it doesn't work due to an error
audio = item.get("audio") or item.get("audio_url") or item.get("url") or item.get("path")
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

You can fix it like this, for example:
#audio = item.get("audio") or item.get("audio_url") or item.get("url") or item.get("path")
audio = None
for key in ["audio", "audio_url", "url", "path"]:
if item.get(key) is not None:
audio = item[key]
break

It would also be worth fixing build_transcription_messages or making a separate function for loading from an array

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions