import{b as i,i as a}from"./useflows-BpG3C9m1.js";import{e}from"./main-few-lands-burn.js";import{s as m,h as n}from"./machine.-BRuqPpdF.js";import{h as l,c as p}from"./commonut-0ul1PEs-.js";import{f as E}from"./machineh-OOc3R6Tc.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const h=i(({helpers:t})=>({states:{components:[p(t),{componentName:t.componentName.select,helperText:e("Choose the Groq model to use for transcription."),id:"model-id",label:e("Model"),onChange:"SELECT_MODEL",optionFilterProp:"label",options:[{label:e("whisper-large-v3"),value:"whisper-large-v3"},{label:e("distil-whisper-large-v2-en"),value:"distil-whisper-large-v2-en"}],path:"model",render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:""},{componentName:t.componentName.mixInput,helperText:e("The audio file to transcribe. Supported formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm."),id:"audio-file",label:e("Audio File"),onChange:"HANDLE_AUDIO_FILE",path:"file",render:"IF_MODEL_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,helperText:e('The language of the input audio in ISO-639-1 format (e.g., "en" for English).'),id:"language",label:e("Language"),onChange:"HANDLE_LANGUAGE",path:"language",render:"IF_MODEL_SELECTED",value:[]},{componentName:t.componentName.mixInput,helperText:e("An optional text to guide the model's style or continue a previous audio segment."),id:"prompt",label:e("Prompt"),onChange:"HANDLE_PROMPT",path:"prompt",render:"IF_MODEL_SELECTED",value:[]},{componentName:t.componentName.mixInput,helperText:e("The sampling temperature, between 0 and 1. Default is 0."),id:"temperature",label:e("Temperature"),onChange:"HANDLE_TEMPERATURE",path:"temperature",render:"IF_MODEL_SELECTED",value:[]},{componentName:t.componentName.select,helperText:e("The format of the transcript output."),id:"response-format",label:e("Response Format"),onChange:"HANDLE_RESPONSE_FORMAT",options:[{label:e("JSON"),value:"json"},{label:e("Text"),value:"text"},{label:e("Verbose JSON"),value:"verbose_json"}],path:"response_format",render:"IF_MODEL_SELECTED",value:"json"}]},actions:{CONNECTION_ADD_CHANGE:l,HANDLE_AUDIO_FILE:n("audioFile"),HANDLE_LANGUAGE:n("language"),HANDLE_PROMPT:n("prompt"),HANDLE_RESPONSE_FORMAT:n("responseFormat"),HANDLE_TEMPERATURE:n("temperature"),IF_CONNECTION_SELECTED:({$:o})=>a(o.getComponent("connection-id")?.value),SELECT_MODEL:n("modelId"),IF_MODEL_SELECTED:({$:o})=>a(o.getComponent("connection-id")?.value)&&o.getComponent("model-id")?.value!=="",SET_CONNECTION:({$:o,e:r})=>{n("connectionId")({$:o,e:r}),E(o)},ON_MACHINE_LOAD:({$:o})=>{m(o,[{db:"connectionId",id:"connection-id"},{db:"modelId",id:"model-id"},{db:"audioFile",id:"audio-file"},{db:"language",id:"language"},{db:"prompt",id:"prompt"},{db:"temperature",id:"temperature"},{db:"responseFormat",id:"response-format"}])}}}));export{h as default};
