Skip to content

Conversation

@ajsalow
Copy link
Collaborator

@ajsalow ajsalow commented Aug 14, 2025

All of this is untested but I think we need to add an audio codec to support sending audio bytes to hugging face ASR models.

with open("path/to/audio.wav", "rb") as f:
    audio_bytes = f.read()

audio_b64 = base64.b64encode(audio_bytes).decode()

body = {
    "inputs": [
        {
            "name": "inputs",
            "shape": [1],
            "datatype": "BYTES",
            "parameters": {
                "content_type": "audio_bytes"  # This is the key
            },
            "data": [audio_b64],  # Base64 encoded bytes
        }
    ]
}

Copy link

@scarpenter44 scarpenter44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajsalow
Copy link
Collaborator Author

ajsalow commented Aug 20, 2025

At least some of the failing tests are failing in CI because "No space left on device" changes shouldn't impact many of them, merging.

@ajsalow ajsalow merged commit f44888e into master Aug 20, 2025
12 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants