PageSourceSearch

https://vidmax.ai/assets/ai-sound-effects-D-vdv9Uu.js

js vidmax.ai collected 2026-10-05 13:14:50 UTC 12,635 bytes, 2 lines download raw bytes

1import{k5 as g,iW as i,k4 as u,g8 as W,kP as $,hZ as e,jB as q,r as N,bu as M,k as Q,ib as Z,fG as J}from"./index-D04aio-r.js";import{S as ee}from"./StickyAudioPlayer-eyZ0HMh4.js";import{V as n,b6 as se,L as te,b2 as ae,bo as ne,dw as re,c1 as A,bk as z,cX as ie,r as oe,c5 as ce,b_ as le}from"./index.min-DqM6n_B9.js";import{i as f}from"./isEmpty-S9orheW4.js";import{t as _}from"./truncate-AnJzmrIX.js";import{C as I,d as D,e as L,b as F,a as R,c as de}from"./ShadcnCard-B1kp8rMd.js";import{B as c}from"./ShadcnBadge-bx-Pzfol.js";import{T as me}from"./ShadcnTextarea-Cwm6ln5J.js";import{T as y}from"./Tooltip-B1bz1H2k.js";import{S as B}from"./ShadcnSlider-BXv9yCtV.js";import{I as ue}from"./Input-DHyEO0-w.js";import{T as fe,d as he,e as H,c as b,a as pe,b as w}from"./ShadcnTable-D0ANkqxE.js";import{C as xe}from"./CustomHead-B5FxR42g.js";import{A as ge}from"./AppLayout-Szr5jlpX.js";import{B as je}from"./BreadcrumbBanner-C4EJ6P9Z.js";import{a as ve}from"./seo-C_GsVxce.js";import{A as Ne}from"./AixContentBody-fQxHHTvZ.js";import"./relativeTime-N7g-8BWw.js";import"./useScreenSize-BEPGl4iJ.js";import"./AixDrawerSwitcher-D41cYW5q.js";import"./_isIterateeCall-DtjUgCb3.js";import"./clock-CjwqgSVJ.js";import"./index-Cl-odbD8.js";import"./index-DEbtbRBY.js";import"./index-CxeoeHDb.js";import"./GradientBackground-CE4URicP.js";import"./PageLoading-BBgE9Zdd.js";import"./Logo-BWgbhxtJ.js";import"./ShadcnSidebar-CcFML6pV.js";import"./ShadcnSeparator-Cywnz346.js";import"./ShadcnSkeleton-DSmN0vHW.js";import"./draftJotai-DQYuv8fM.js";import"./ShadcnCheckbox-92pAQifO.js";import"./check-B_z0h917.js";import"./ShadcnLabel-MragvuuG.js";import"./ShadcnDropDownMenu-CDosLHU_.js";import"./chevron-right-Dl6YQr4T.js";import"./index-CGdagJvn.js";import"./TopUpModal-A-E0v9Cy.js";import"./subscription-C8Q96QLQ.js";import"./crypto-BX1xTAsC.js";import"./stripe.esm-dkXHr68O.js";import"./isNil-CHIgUVhi.js";import"./prismaTypings-DW8Hx9Vn.js";import"./chevron-down-i3Wj6aME.js";import"./find-CVDvtCjo.js";import"./send-Ct-BUx38.js";import"./circle-alert-WnyPIyXg.js";import"./index-CBMyeA0S.js";import"./ShadcnTabs-B9RDPswh.js";import"./index-DYvv3epU.js";import"./coerce-B8myVSW-.js";import"./ShadcnBreadcrumb-Bhjys1re.js";import"./AixContentHeader-pxmQ4NoZ.js";import"./chevron-left-DkAqb8DK.js";import"./adsPlatformStripePricing-CtBvO230.js";const ye=["Gentle rain falling on leaves with soft thunder in the distance","Ocean waves crashing against rocky cliffs with seagulls calling","Morning birds chirping in a dense forest with rustling leaves","Crackling campfire with gentle wind and distant owl hoots","Mountain stream flowing over rocks with chirping crickets"],be=["Futuristic button click with digital confirmation beep","Retro arcade game power-up sound with electronic flourish","Sci-fi door opening with hydraulic hiss and electronic hum","Digital data transfer sound with pulsing synthesizer tones","Robotic beep sequence with metallic echo and static"],we=["Medieval sword clashing against metal shield","Explosion with debris falling and echoing blast","Arrow whooshing through air and hitting wooden target","Heavy footsteps running on gravel with breathing sounds","Glass breaking with sharp fragments scattering on stone"],Se=["Soft wind through pine trees in a peaceful forest","Distant church bells echoing across misty valley","Underground cave with water droplets and subtle echoes","Space station hum with gentle electrical vibrations","Desert wind with sand shifting and distant coyote calls"],Ce=["Success notification chime with ascending musical notes","Error alert sound with declining tone and subtle buzz","Message received ping with soft bell resonance","Button hover sound with gentle click and feedback tone","Loading complete sound with satisfying resolution chord"],U=500,Ee=()=>{const h=g.useContext(),[a,j]=i.useState(""),[p,O]=i.useState(""),[G,S]=i.useState(null),[o,C]=i.useState({duration_seconds:3,prompt_influence:.3}),{data:Y,isLoading:V,fetchNextPage:Pe,hasNextPage:Te,isFetchingNextPage:Me,refetch:Ae}=g.voices.getSoundEffects.useInfiniteQuery({limit:50},{getNextPageParam:s=>s.nextCursor,keepPreviousData:!1}),E=Y?.pages.flatMap(s=>s.items)||[],{mutate:k,isLoading:x}=g.voices.createSoundEffect.useMutation({onSuccess:s=>{j(""),h.voices.getSoundEffects.invalidate(),s&&S(s)},onError:s=>{u.error(s.message||"Failed to generate sound effect! Please try again later!")}}),{mutate:X}=g.voices.deleteSoundEffect.useMutation({onSuccess:()=>{u.success("Sound effect deleted successfully!"),h.voices.getSoundEffects.invalidate()},onError:s=>{u.error(s.message||"Failed to delete sound effect!")}}),P=f(p)?E:W(E,s=>{const t=p.toLowerCase(),r=s.misc||{},m=r.name||"Untitled",K=r.generationMetadata?.script||"";return m.toLowerCase().includes(t)||K.toLowerCase().includes(t)}),v=i.useCallback(()=>
1{if(f(a.trim())){u.error("Please enter a sound effect description!");return}k({script:a,soundEffectSettings:o})},[a,k,o]),l=i.useCallback(s=>{const t=Math.floor(Math.random()*s.length);return s[t]||s[0]||"Generate a sound effect"},[]),d=i.useCallback(s=>{j(s)},[]),T=i.useCallback((s,t)=>{const r=document.createElement("a");r.href=s,r.download=`${t.replace(/[^a-z0-9]/gi,"_").toLowerCase()}.mp3`,document.body.appendChild(r),r.click(),document.body.removeChild(r)},[]);return $("meta+enter",()=>{!x&&!f(a.trim())&&v()},{enableOnFormTags:["textarea"],preventDefault:!0},[v,x,a]),e.jsxs("div",{className:"w-full space-y-6",children:[e.jsxs(I,{className:"w-full",children:[e.jsxs(D,{children:[e.jsx(L,{children:"Generate New Sound Effect"}),e.jsx(F,{children:"Describe the sound effect you want to create using natural language"})]}),e.jsxs(R,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-medium",children:"Sound Effect Description"}),e.jsxs(c,{variant:"secondary",className:"shrink-0",children:[q(a)," / ",U]})]}),e.jsx(me,{placeholder:"Describe the sound effect you want to generate...",rows:6,value:a,onChange:s=>j(s.target.value),maxLength:U}),e.jsxs("div",{className:"flex flex-wrap gap-2 mt-2",children:[e.jsxs(c,{variant:"outline",className:"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>d(l(ye)),children:[e.jsx(n,{icon:se,size:14,className:"mr-1"}),"Nature"]}),e.jsxs(c,{variant:"outline",className:"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>d(l(be)),children:[e.jsx(n,{icon:te,size:14,className:"mr-1"}),"Tech"]}),e.jsxs(c,{variant:"outline",className:"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>d(l(we)),children:[e.jsx(n,{icon:ae,size:14,className:"mr-1"}),"Action"]}),e.jsxs(c,{variant:"outline",className:"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>d(l(Se)),children:[e.jsx(n,{icon:ne,size:14,className:"mr-1"}),"Ambient"]}),e.jsxs(c,{variant:"outline",className:"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>d(l(Ce)),children:[e.jsx(n,{icon:re,size:14,className:"mr-1"}),"UI Sound"]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Sound Effect Settings"}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm",children:"Duration"}),e.jsx(y,{content:"Length of the generated sound effect in seconds. Shorter durations work better for specific sounds, longer for ambient effects.",children:e.jsx(n,{icon:A,size:14,className:"text-muted-foreground"})})]}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[o.duration_seconds,"s"]})]}),e.jsx(B,{value:[o.duration_seconds],min:1,max:10,step:1,onValueChange:([s])=>C(t=>({...t,duration_seconds:s}))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm",children:"Prompt Influence"}),e.jsx(y,{content:"How closely the AI follows your prompt. Higher values stick closer to your description, lower values allow more creative interpretation.",children:e.jsx(n,{icon:A,size:14,className:"text-muted-foreground"})})]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:o.prompt_influence.toFixed(1)})]}),e.jsx(B,{value:[o.prompt_influence],min:0,max:1,step:.1,onValueChange:([s])=>C(t=>({...t,prompt_influence:s}))})]})]})]})]}),e.jsx(de,{children:e.jsx(N,{onClick:v,disabled:x||f(a.trim()),className:"w-full",children:x?e.jsxs(e.Fragment,{children:[e.jsx(M,{size:16,className:"mr-2 animate-spin"}),"Generating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(n,{icon:z,size:16,className:"mr-2"}),"Generate Sound Effect",e.jsx(Q,{className:"ml-3",keyClassName:"bg-transparent text-primary-foreground
1/80 border-primary-foreground/50",keys:["meta","Enter"]})]})})})]}),e.jsxs(I,{className:"w-full",children:[e.jsxs(D,{children:[e.jsxs(L,{className:"flex items-center justify-between",children:[e.jsx("span",{children:"Sound Effects History"}),e.jsxs("div",{className:"relative w-64",children:[e.jsx(ue,{placeholder:"Search sound effects...",value:p,onChange:s=>O(s.target.value),className:"pr-10"}),e.jsx(n,{icon:ie,size:18,className:"absolute transform -translate-y-1/2 text-muted-foreground right-3 top-1/2"})]})]}),e.jsx(F,{children:"Browse your generated sound effects"})]}),e.jsx(R,{className:"max-h-[400px] overflow-y-auto",children:V?e.jsx("div",{className:"flex items-center justify-center h-32",children:e.jsx(M,{size:24,className:"animate-spin"})}):P.length>0?e.jsxs(fe,{containerClassName:"flex-1",children:[e.jsx(he,{children:e.jsxs(H,{children:[e.jsx(b,{children:"Name"}),e.jsx(b,{children:"Created"}),e.jsx(b,{className:"text-right",children:"Action"})]})}),e.jsx(pe,{children:Z(P,s=>{const t=s.misc?.generationMetadata,r=e.jsxs("div",{className:"space-y-1 text-xs",children:[t?.soundEffectSettings&&e.jsxs("div",{children:[e.jsx("strong",{children:"Settings:"}),e.jsxs("ul",{className:"pl-4 list-disc",children:[t.soundEffectSettings.duration_seconds!==void 0&&e.jsxs("li",{children:["Duration: ",t.soundEffectSettings.duration_seconds,"s"]}),t.soundEffectSettings.prompt_influence!==void 0&&e.jsxs("li",{children:["Prompt Influence: ",t.soundEffectSettings.prompt_influence.toFixed(1)]})]})]}),f(t)&&e.jsx("p",{children:"No generation metadata available."})]});return e.jsxs(H,{className:"cursor-pointer",onClick:()=>S(s),children:[e.jsx(w,{className:"font-medium",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{content:r,children:e.jsx(n,{icon:oe,size:14,className:"text-muted-foreground cursor-help"})}),e.jsx("span",{children:_(s.misc?.name||s.misc?.generationMetadata?.script||"Untitled",{length:50})})]})}),e.jsx(w,{children:J(s.createdAt).format("MMM DD, YYYY")}),e.jsxs(w,{className:"text-right",children:[e.jsx(N,{variant:"ghost",size:"icon",onClick:m=>{m.stopPropagation(),s.misc?.audioUrlSigned?T(s.misc.audioUrlSigned,s.misc.name||s.misc.generationMetadata?.script||"sound_effect"):u.error("Audio URL not available for download.")},"aria-label":`Download ${_(s.misc?.name||s.misc?.generationMetadata?.script||"Untitled",{length:20})}`,className:"mr-1",children:e.jsx(n,{icon:ce,size:16})}),e.jsx(N,{variant:"secondary",size:"icon",className:"text-destructive",onClick:m=>{m.stopPropagation(),confirm("Are you sure you want to delete this sound effect?")&&X({soundEffectId:s.id})},children:e.jsx(n,{icon:le,size:16})})]})]},s.id)})})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-32 text-center",children:[e.jsx(n,{icon:z,size:48,className:"mb-4 text-gray-400"}),e.jsx("h3",{className:"text-lg font-medium",children:"No sound effects found"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:p?"Try different search terms":"Generate some sound effects to see them here"})]})})]}),e.jsx(ee,{assetToPlay:G,onDownloadOverride:T})]})};function ke(){const h=[{label:"Home",href:"/home"},{label:"AI Sound Effects"}],a=ve("tools/ai-sound-effects");return e.jsxs(e.Fragment,{children:[e.jsx(je,{items:h}),e.jsx(xe,{title:a.title,description:a.description,keywords:a.keywords,pageType:a.pageType,url:"https://vidmax.ai/tools/ai-sound-effects"}),e.jsx("div",{className:"space-y-6",children:e.jsx(Ne,{children:e.jsx(Ee,{})})})]})}function Is(){return e.jsx(ge,{children:e.jsx(ke,{})})}export{Is as component};
2//# sourceMappingURL=ai-sound-effects-D-vdv9Uu.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.