다시 해보니 telegram은 ogg로 보내는데 이걸 넣으면 wav가 아니라서 배째는거라

ffmpeg을 통해서 ogg를 wav로 바꾸고 하니 먼가 처리를 한다.

다만 소리 크기가 작아서 인가 은근히 인식율이 떨이지네.. (gemma4:e2b)

 

----

ollama 통해서 하고 있는데 미구현인가..

아니면  gemma4:e2b가 ollama에서 할 때 오디오는 미지원인건가... 이건 어떻게 확인하지?

그 와중에 왜 이미지로 인식하냐?

--- [Prompt to AI] (Model: gemma4:e2b) ---
[{'role': 'user', 'content': [{'type': 'text', 'text': '이 내용을 분석해줘'}, {'type': 'input_audio', 'input_audio': {'data': 'encoded data', 'format': 'wav'}}]}]


 {'error': {'message': 'Failed to create new sequence: failed to process inputs: imageunknown format', 'type': 'api_error', 'param': None, 'code': None}}
 

 

$ ollama show gemma4:e2b
  Model
    architecture        gemma4    
    parameters          5.1B      
    context length      131072    
    embedding length    1536      
    quantization        Q4_K_M    
    requires            0.20.0    

  Capabilities
    completion    
    vision        
    audio         
    tools         
    thinking      

  Parameters
    temperature    1       
    top_k          64      
    top_p          0.95    

  License
    Apache License               
    Version 2.0, January 2004    
    ...                          

 

import OpenAI from "openai";
const openai = new OpenAI();

// Fetch an audio file and convert it to a base64 string
const url = "https://cdn.openai.com/API/docs/audio/alloy.wav";
const audioResponse = await fetch(url);
const buffer = await audioResponse.arrayBuffer();
const base64str = Buffer.from(buffer).toString("base64");

const response = await openai.chat.completions.create({
  model: "gpt-audio",
  modalities: ["text", "audio"],
  audio: { voice: "alloy", format: "wav" },
  messages: [
    {
      role: "user",
      content: [
        { type: "text", text: "What is in this recording?" },
        { type: "input_audio", input_audio: { data: base64str, format: "wav" }}
      ]
    }
  ],
  store: true,
});

console.log(response.choices[0]);

[링크 : https://developers.openai.com/api/docs/guides/audio?example=audio-in]

 

 

[링크 : https://community.openai.com/t/how-can-i-pass-a-system-prompt-and-audio-user-input-to-get-a-text-output-back/1002483/3]

[링크 : https://github.com/ggml-org/llama.cpp/issues/21868]

'프로그램 사용 > ai 프로그램' 카테고리의 다른 글

ollama multimodal gemma4:e2b 테스트  (0) 2026.05.07
opencode + llama.cpp  (0) 2026.05.06
llm tts?  (0) 2026.05.05
stablie diffusion 모델 변경 / 다운로드 하기  (0) 2026.05.05
gemma4 e?b 멀티모달  (0) 2026.05.05
Posted by 구차니