Skip to content

Instantly share code, notes, and snippets.

@limcheekin
Last active August 31, 2025 06:09
Show Gist options
  • Select an option

  • Save limcheekin/68b182df2a4df1b16cfbcf8e02281c92 to your computer and use it in GitHub Desktop.

Select an option

Save limcheekin/68b182df2a4df1b16cfbcf8e02281c92 to your computer and use it in GitHub Desktop.
LocalAI audio input curl request
B64=$(base64 test.wav)
curl -v http://192.168.1.111:8880/v1/chat/completions \
-H "Content-Type: application/json" \
-d @- <<JSON
{
"model": "qwen2.5-omni-3b",
"messages": [
{
"role": "user",
"content": [
{"type":"text","text":"What is this audio?"},
{
"type":"audio_url",
"audio_url": {
"url": "data:audio/wav;base64,${B64}"
}
}
]
}
],
"temperature": 0.0
}
JSON
{"created":1756620188,"object":"chat.completion","id":"fda96dcb-c972-46e0-8b59-f98c61e26848","model":"qwen2.5-omni-3b","choices":[{"index":0,"finish_reason":"stop","message":{"role":"assistant","content":"The audio is a bird chirping."}}],"usage":{"prompt_tokens":765,"completion_tokens":9,"total_tokens":774}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment