PageSourceSearch

https://static-cos.mureka.ai/cos-prod/mureka/static/js/index-p3hIFV5i.js

js mureka.ai collected 2026-09-24 09:23:21 UTC 204,171 bytes, 1 lines download raw bytes

1import{x as e,y as t,H as o,a6 as i,I as n,B as a,O as l,au as r,aA as s,r as d,V as c,f as u,z as p,U as g,K as v,P as m,u as f,J as h,G as b,at as y,g as _,w,a2 as x,c as k,n as C,Q as S,M as T,D as A,X as I,R as L,S as P,ai as M,ac as V,aC as D}from"./vendor-core-DockhpYX.js";import{g as $,d as R,u as E,a as F,C as U,h as B,a6 as O,s as z,b as q,m as H,d0 as j,o as N,d1 as W,bf as Y,j as G,d2 as Q,e as K,an as X,l as J,G as Z,_ as ee,aD as te,aE as oe,n as ie,a0 as ne,M as ae,k as le}from"./index-DIXwfVMT.js";import{_ as re}from"./index-7J1yMQU2.js";import{g as se,i as de,t as ce,$ as ue}from"./i18n-misc-CJ8HFqLU.js";import{c as pe}from"./clipUtil-Cm1WHU6U.js";import{_ as ge}from"./AudioPlayerSlider-DS_NgRbv.js";import{_ as ve}from"./LoaderCircle-CVBYnNOL.js";import{p as me}from"./pause-BwjHkNid.js";import{_ as fe}from"./LoaderWave-BLdNKbR3.js";import{a as he,_ as be}from"./Search-mxSMIlov.js";import{_ as ye}from"./uploadClipImageMini-D9rFUyTf.js";import{v as _e}from"./vue-filepond.esm-CVTHONcd.js";import{_ as we,a as xe}from"./PullTo-BIvbThln.js";import{A as ke,_ as Ce}from"./AudioPlayer-C0e_oCjk.js";import{L as Se}from"./LazyLoadImg-Bzjg4n3F.js";import{m as Te}from"./utils-BoALak89.js";import{R as Ae}from"./reportDialog-dfPF1U9u.js";import{j as Ie}from"./element-plus-CADUlNlv.js";import"./@paypal-DitgUCQS.js";import"./@ffmpeg-CcTuH-sP.js";import{C as Le}from"./createAiFlag-LgHpF5sP.js";import"./axios-C-1G2k3o.js";import"./img-empty-BTiNkDHg.js";const Pe={class:"custom-tab-container"},Me=["onClick"],Ve={class:"custom-tab-label"},De={__name:"tab",props:{modelValue:{type:[String,Number],default:""},tabs:{type:Array,default:()=>[]}},emits:["update:modelValue","tabClick"],setup(r,{emit:s}){const d=r,c=s;return(s,u)=>(t(),e("div",Pe,[(t(!0),e(o,null,i(r.tabs,o=>(t(),e("div",{key:o.value,class:n(["custom-tab-item pointer",{active:o.value===d.modelValue}]),onClick:()=>{var e;e=o.value,c("update:modelValue",e),c("tabClick",e)}},[a("div",Ve,l(o.label),1),u[0]||(u[0]=a("div",{class:"custom-tab-active-indicator"},null,-1))],10,Me))),128))]))}},$e={class:"tts-audio-bar flex"},Re={class:"tts-audio-bar-info flex"},Ee={class:"tts-audio-bar-info-name olh"},Fe={class:"tts-audio-bar-slider"},Ue={class:"tts-audio-bar-op"},Be={__name:"audioBar",props:{voiceInfo:{type:Object,default:()=>({})},hideRemove:{type:Boolean,default:!1}},emits:["remove"],setup(o,{expose:i,emit:y}){var _;r(),s();const w=o,x=y,k=d(null),C=c({duration:((null==(_=w.voiceInfo)?void 0:_.duration_milliseconds)??0)/1e3,isplay:!1,buffer:!1,progress:0}),S=e=>{C.duration=e},T=e=>{C.isplay=e},A=e=>{C.buffer=e},I=e=>{C.progress=e},L=()=>{var e,t;(null==(e=w.voiceInfo)?void 0:e.mp3_url)?null==(t=k.value)||t.changeOp():x("togglePlay")},P=()=>{x("remove")};return i({togglePlay(e){var t;null==(t=k.value)||t.changeOp(e)}}),u(()=>{}),(o,i)=>{var r;return t(),e("div",$e,[a("div",Re,[a("div",{class:"tts-audio-bar-info-op",onClick:L},[g(ve,{loading:C.isLoading,size:34,color:"#fff",marginSize:0,strokeWidth:2},{default:v(()=>{var e,t;return[a("div",{class:"tts-audio-bar-info-op-icon flex-center",style:m((null==(e=w.voiceInfo)?void 0:e.cover)?{backgroundImage:`url(${f($)(null==(t=w.voiceInfo)?void 0:t.cover)})`,backgroundSize:"100% 100%"}:{})},[a("i",{class:n(["block",{play:!C.isplay,pause:C.isplay}])},null,2)],4)]}),_:1},8,["loading"])]),p(o.$slots,"Prefix",{},()=>{var e;return[a("div",Ee,l((null==(e=w.voiceInfo)?void 0:e.title)??""),1)]})]),a("div",Fe,[g(ge,{ref_key:"refPlayer",ref:k,renderStyle:{"--timeColor":"#fff","--timeFontSize":"14px","--timeFontWeight":"400","--timeMinWidth":"44px"},loop:!1,url:`${f($)(null==(r=w.voiceInfo)?void 0:r.mp3_url)}`,duration:C.duration,onSyncDuration:S,onSyncPlayState:T,onSyncLoadingState:A,onSyncProgress:I},null,8,["url","duration"])]),a("div",Ue,[p(o.$slots,"suffix",{},()=>[w.hideRemove?b("",!0):(t(),h(R,{key:0,size:"24px",icoSize:"20px",onOnClick:P,backgroundColor:"rgba(255, 255, 255, 0.1)",hoverBackgroundColor:"rgba(255, 255, 255, 0.2)"},{default:v(()=>[...i[0]||(i[0]=[a("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIISURBVHgB7drxUcIwFAbwD8//xQnoCIzgBo6gI+AE6gSygbiBm+gGzQbABDE5y1lDa2n73qvR73eXw5qS0keal6YAREREREREREREirz3N6FsfX9lfC+MzWAsnmh4KTDMbjabXcLQGezNMdwOxqYI0F0oDv3F4DyC6H8ZkZW0lV4g643OYn5cVtI2OutJDNJjspK20VlPIkBDs5K235n1qmu/roCS0PYyOdYbhGnMg1yyXUBPenmLTyQ1ApR+yAtkTCNA+2Rb89
16pSLYdhFn0IM0sl7a9h7DJAuS/JpiNE7qu+pa2zW9mewsns0oyy7plv7K2z7ZvfbXPOjnWCsKmHKSL2t/zAfVN/88yi2kO0otk20EY03wHThQ7TLGiKEk9QCqL9jGdfDtI0HcfiTYk5N6D1GkFyNU3NO7oG9p0UJBzDzKZRZv0IOhksqwDdMpcqL6PG1BvQitApyx5HJZq25ZGu+qLZNtBwTl0dN7Rh4y8CS8btOiqh8FSR2R1iWmsCf2pMWgBeQV+PqYIqwBp3NGnQS+Ri4bHMVsI88ePu5fIScMJ3ENIbCtpO5/ecxA+9IM/9lz1rt6DdnxPKFehPDW1i9xUJ1R6faVXfHqrquotmj+NiW3nNfak4rfrdXpSaREcs1+5hpO5DS/X+Jy/xNJ3HNpV5T2U1zDTfgEREREREREREZGwD+2peffSxQXgAAAAAElFTkSuQmCC"},null,-1)])]),_:1}))])])])}}},Oe={class:"tts-credits-button-credits"},ze={class:"tts-credits-button-button flex"},qe={key:0,class:"tts-credits-button-button"},He={class:"tts-credits-button-button"},je={__name:"creditsButton",props:{loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},buttonLeftText:{type:String,default:null},showLeftButton:{type:Boolean,default:!1},buttonText:{type:String,default:""},membership_source:{type:Object,default:()=>({membership_source1:"editor",membership_source2:"credits"})}},emits:["onClick","onLeftButtonClick"],setup(o,{emit:i}){var d;const m=E(),h=F(),{createRenderType:k}=y(h);r(),s();const{$$language:C,$$t:S,$$tm:T,$$tValue:A}=(null==(d=_().appContext)?void 0:d.config.globalProperties.$i18n)??{},I=o,L=i,P=c({userCredits:m.isLogin?m.credits??0:0}),M=()=>{L("onClick")},V=()=>{L("onLeftButtonClick")};return w(()=>m.credits,()=>{P.userCredits=m.credits??0}),u(()=>{}),(o,i)=>(t(),e("div",{class:n(["tts-credits-button flex",{[`tts-credits-button--${f(k)}`]:!0}])},[a("div",Oe,[p(o.$slots,"text")]),a("div",ze,[p(o.$slots,"default",{},()=>[I.showLeftButton?(t(),e("div",qe,[g(f(U),{type:"ghost",onClick:V},{default:v(()=>[x(l(I.buttonLeftText??f(S)("library.Back")),1)]),_:1})])):b("",!0),a("div",He,[g(f(U),{disabled:I.disabled,loading:I.loading,onClick:M},{default:v(()=>[x(l(I.buttonText),1)]),_:1},8,["disabled","loading"])])])])],2))}},Ne={class:"clone-voice-record-panel"},We=["src"],Ye={class:"clone-voice-record-panel__timer"},Ge={key:0,class:"clone-voice-record-panel__timer-single"},Qe={class:"clone-voice-record-panel__timer-current"},Ke={class:"clone-voice-record-panel__timer-total"},Xe={class:"clone-voice-record-panel__hint"},Je={class:"clone-voice-record-panel__controls"},Ze=["disabled"],et={class:"clone-voice-record-panel__cta-inner clone-voice-record-panel__cta-inner--red"},tt={key:0,class:"clone-voice-record-panel__cta-shell clone-voice-record-panel__cta-shell--maxed clone-voice-record-panel__cta-shell--progressing",type:"button","aria-label":"Maximum recording reached",disabled:""},ot={class:"clone-voice-record-panel__cta-progress",viewBox:"0 0 124 52","aria-hidden":"true"},it={class:"clone-voice-record-panel__cta-inner clone-voice-record-panel__cta-inner--red"},nt=["disabled","aria-label"],at={key:0,class:"clone-voice-record-panel__cta-progress",viewBox:"0 0 124 52","aria-hidden":"true"},lt={class:"clone-voice-record-panel__cta-inner clone-voice-record-panel__cta-inner--red"},rt={key:0,class:"clone-voice-record-panel__cta-icon-wrap"},st=["src"],dt={key:1,class:"clone-voice-record-panel__cta-label"},ct={key:2,class:"clone-voice-record-panel__cta-icon-wrap"},ut=["aria-label","disabled"],pt={key:0,class:"clone-voice-record-panel__control-playing"},gt=["src"],vt={__name:"record",props:{type:{type:String,default:"motif"}},emits:["tooggleRecord","recordAddSuccess"],setup(i,{expose:r,emit:s}){var c,p,v,y,x;const T="#FC5555",A="#48E1EB",I="#48E1EB",L=[],P=i,M=s,V=null==(c=_())?void 0:c.appContext,{$$t:D}=(null==(x=null==(y=null==(v=null==(p=_())?void 0:p.appContext)?void 0:v.config)?void 0:y.globalProperties)?void 0:x.$i18n)??{},$=d(null),R=d(null),E=d(null),F=d("idle"),U=d([...L]),q=d([]),H=d(0),j=d(0),N=d(0),W=d(0),Y=d(0),G=d(0),Q=d(""),K=d(!1),X=d(!1);let J=null,Z=null,ee=null,te=null,oe=null,ie=0,ne=0,ae=0,le=0,re=0,se=null,de=0,ce=0,ue=!1,pe=44100,ge=0,ve=[],he=[],be=0,ye=0,_e=0,we=null;const xe=k(()=>"vocal"===P.type?30:5),ke=k(()=>15),Ce=(e=0)=>{const t=Math.max(0,Number(e)||0),o=Math.floor(t/1e3);return`${String(Math.floor(o/60)).padStart(2,"0")}:${String(o%60).padStart(2,"0")}`},Se=k(()=>(()=>{const e=H.value/1e3;return e>=ke.value?D("create.max_recording_reached"):e>=xe.value?D("create.up_to_duration_seconds",{seconds:ke.value}):D("create.at_least_duration_seconds",{seconds:xe.value})})()),Te=k(()=>X.value?N.value:j.value),Ae=k(()=>{const e=Ce(Te.value),t=Ce(H.value);return!H.value||K.value||Te.value===H.value?{mode:"single",single:t,current:t,total:t}:{mode:"double",single:"",current:e,total:t}}),Ie=k(()=>!1),Le=k(()=>H.value>=1e3*xe.value),Pe=k(()=>Te.value>=1e3*ke.value),Me=k(()=>Math.abs(Te.value-H.value)<=50),Ve=k(()=>K.value||"paused"===F.value&&Me.value?D("create.continue"):D("create.replace")),De=k(()=>Math.max(0,W.value/2)),$e=k(()=>{const e=Math.max(U.value.length,G.value+q.value.length);if(!e)return 0;const t=Math.max(0,e-1);return"recording"===F.value?Math.max(0,Math.min(t,G.value+Math.max(0,q.value.length-1))):K.value?t:H.value?Math.max(0,Math.min(t,Math.round(Te.value/H.value*t))):0}),Re=k(()=>{const e=1e3*ke.value;return Math.min(H.value/e,1)}),Ee=k(()=>({strokeDasharray:`${Math.max(0,Math.min(100,100*Re.value))} 100`,strokeDashoffset:"0"})),Fe=e=>{z.error({position:"top",content:e||(null==D?void 0:D("create.device_not_support_recorder"))||"Your device does not support recording."})},Ue=()=>{var e;
1null==(e=null==J?void 0:J.getTracks)||e.call(J).forEach(e=>e.stop()),J=null},Be=()=>{le&&(window.clearInterval(le),le=0)},Oe=()=>{Be(),le=window.setInterval(()=>{j.value>=1e3*ke.value&&(Tt(!0),z.success({position:"top",content:D("tts.recoderMaxTime",{time:ke.value})}))},100)},ze=()=>{ne&&(cancelAnimationFrame(ne),ne=0)},qe=()=>{Q.value&&(URL.revokeObjectURL(Q.value),Q.value="")},He=(e=0)=>e&&pe?e/pe*1e3:0,je=()=>Math.max(0,Math.min(ge,Math.round(Te.value/1e3*pe))),vt=e=>{var t,o;const i=(null==(o=null==(t=null==e?void 0:e.chunks)?void 0:t.reduce)?void 0:o.call(t,(e,t)=>e+t.length,0))??0;return{startSample:e.startSample,endSample:e.startSample+i,chunks:e.chunks}},mt=(e,t,o)=>{if(!e||o<=t)return null;const i=[];let n=e.startSample;return e.chunks.forEach(e=>{const a=n,l=n+e.length,r=Math.max(a,t),s=Math.min(l,o);s>r&&i.push(e.slice(r-a,s-a)),n=l}),i.length?vt({startSample:t,chunks:i}):null},ft=()=>{if(!ge)return new Float32Array(0);const e=new Float32Array(ge);return ve.forEach(t=>{let o=t.startSample;t.chunks.forEach(t=>{e.set(t,o),o+=t.length})}),e},ht=()=>{const e=ft();if(!e.length)return null;const t=new ArrayBuffer(44+2*e.length),o=new DataView(t),i=(e,t)=>{for(let i=0;i<t.length;i+=1)o.setUint8(e+i,t.charCodeAt(i))};i(0,"RIFF"),o.setUint32(4,36+2*e.length,!0),i(8,"WAVE"),i(12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,1,!0),o.setUint32(24,pe,!0),o.setUint32(28,2*pe,!0),o.setUint16(32,2,!0),o.setUint16(34,16,!0),i(36,"data"),o.setUint32(40,2*e.length,!0);let n=44;for(let a=0;a<e.length;a+=1){const t=Math.max(-1,Math.min(1,e[a]));o.setInt16(n,t<0?32768*t:32767*t,!0),n+=2}return new Blob([t],{type:"audio/wav"})},bt=()=>{qe();const e=ht();return e?(Q.value=URL.createObjectURL(e),e):null},yt=()=>{var e,t;W.value=(null==(e=R.value)?void 0:e.clientWidth)||0,Y.value=(null==(t=R.value)?void 0:t.clientHeight)||0;const o=E.value;if(!o)return;const i=window.devicePixelRatio||1;o.width=Math.round(W.value*i),o.height=Math.round(Y.value*i),o.style.width=`${W.value}px`,o.style.height=`${Y.value}px`;const n=o.getContext("2d");null==n||n.setTransform(i,0,0,i,0,0),wt()},_t=()=>{const e=E.value;if(!e)return;const t=e.getContext("2d");if(!t)return;const o=W.value,i=Y.value;if(t.clearRect(0,0,o,i),!o||!i)return;const n=i/2;if(!Math.max(U.value.length,G.value+q.value.length)){const e=4,i=Math.round(n-e/2),a=2,l=2,r=e/2;t.fillStyle="rgba(255, 255, 255, 0.18)";for(let n=0;n<o;n+=a+l){const l=Math.min(a,o-n);t.beginPath(),t.moveTo(n+r,i),t.lineTo(n+l-r,i),t.arcTo(n+l,i,n+l,i+r,r),t.lineTo(n+l,i+e-r),t.arcTo(n+l,i+e,n+l-r,i+e,r),t.lineTo(n+r,i+e),t.arcTo(n,i+e,n,i+e-r,r),t.lineTo(n,i+r),t.arcTo(n,i,n+r,i,r),t.closePath(),t.fill()}return}const a=De.value,l=$e.value,r="recording"===F.value||"paused"===F.value&&Me.value?-2:0,s=(e,i,s)=>{const d=Math.round(a+r+4*(e-l));if(d+2<0||d>o)return;t.fillStyle=s;const c=Math.max(1,Math.round(i));((e,o,i,n,a)=>{const l=Math.min(a,i/2,n/2);t.beginPath(),t.moveTo(e+l,o),t.lineTo(e+i-l,o),t.arcTo(e+i,o,e+i,o+l,l),t.lineTo(e+i,o+n-l),t.arcTo(e+i,o+n,e+i-l,o+n,l),t.lineTo(e+l,o+n),t.arcTo(e,o+n,e,o+n-l,l),t.lineTo(e,o+l),t.arcTo(e,o,e+l,o,l),t.closePath(),t.fill()})(d,Math.round(n-c/2),2,c,1)},d=G.value,c=d+q.value.length-1;U.value.forEach((e,t)=>{if("recording"===F.value&&q.value.length>0&&t>=d&&t<=c)return;const o="recording"!==F.value&&H.value>0;s(t,e,o?A:I)}),q.value.forEach((e,t)=>{s(d+t,e,T)})},wt=()=>{ae||(ae=requestAnimationFrame(()=>{ae=0,_t()}))},xt=()=>{var e,t,o;ie&&(cancelAnimationFrame(ie),ie=0),null==(e=null==te?void 0:te.disconnect)||e.call(te),null==(t=null==oe?void 0:oe.disconnect)||t.call(oe),ee=null,te=null,oe=null,null==(o=null==Z?void 0:Z.close)||o.call(Z),Z=null},kt=()=>{const e=(null==window?void 0:window.AudioContext)||(null==window?void 0:window.webkitAudioContext)||null;if(!J||!e)return;xt(),Z=new e,pe=Z.sampleRate||44100,ee=Z.createAnalyser(),ee.fftSize=2048,ee.smoothingTimeConstant=.2,te=Z.createMediaStreamSource(J),te.connect(ee),oe=Z.createScriptProcessor(2048,1,1),oe.onaudioprocess=e=>{if("recording"!==F.value)return;const t=e.inputBuffer.getChannelData(0);(e=>{if(!(null==e?void 0:e.length))return;he.push(e),_e+=e.length,K.value=!1;const t=be+_e/pe*1e3;j.value=Math.min(1e3*ke.value,t),H.value=Math.min(1e3*ke.value,Math.max(He(ge),j.value)),wt()})(new Float32Array(t))},ee.connect(oe),oe.connect(Z.destination);const t="function"==typeof ee.getFloatTimeDomainData?new Float32Array(ee.fftSize):null,o=t?null:new Uint8Array(ee.fftSize),i=()=>
1{if(!ee||"recording"!==F.value)return;t?ee.getFloatTimeDomainData(t):o&&ee.getByteTimeDomainData(o);const e=performance.now();if(re||(re=e),e-re>=60){let i=0,n=0;const a=t||o||[];for(let e=0;e<a.length;e+=1){const a=t?Math.abs(t[e]):Math.abs((o[e]-128)/128);a>i&&(i=a),n+=a*a}const l=Math.sqrt(n/Math.max(1,a.length)),r=Math.min(1,1.05*i+1.9*l);(e=>{const t=[...q.value,e];q.value=t.slice(-2e3),wt()})(Math.max(4,Math.min(42,Math.round(42*Math.pow(r,.52))))),re=e}ie=requestAnimationFrame(i)};ie=requestAnimationFrame(i)},Ct=async()=>{await(async()=>{var e;if(!(null==(e=null==navigator?void 0:navigator.mediaDevices)?void 0:e.getUserMedia))throw new Error((null==D?void 0:D("create.device_not_support_recorder"))||"Your device does not support recording.");return Ue(),J=await navigator.mediaDevices.getUserMedia({audio:!0}),J})()},St=async()=>{var e,t;try{await Ct(),null==(t=null==(e=$.value)?void 0:e.pause)||t.call(e),ve=[],he=[],ge=0,H.value=0,j.value=0,N.value=0,G.value=0,be=0,ye=0,_e=0,q.value=[],qe(),F.value="recording",Oe(),kt()}catch(o){Fe(null==o?void 0:o.message)}},Tt=(e=!1)=>{if("recording"!==F.value)return;Be(),xt(),Ue();const t=he.length?ye+_e:je();he.length&&(e=>{const t=vt(e),o=[];ve.forEach(e=>{if(e.endSample<=t.startSample||e.startSample>=t.endSample)o.push(e);else{if(e.startSample<t.startSample){const i=mt(e,e.startSample,t.startSample);i&&o.push(i)}if(e.endSample>t.endSample){const i=mt(e,t.endSample,e.endSample);i&&o.push(i)}}}),o.push(t),o.sort((e,t)=>e.startSample-t.startSample),ve=o,ge=o.reduce((e,t)=>Math.max(e,t.endSample),0)})({startSample:ye,chunks:[...he]}),he=[],_e=0,(()=>{const e=ft();if(!e.length||!pe)return U.value=[],q.value=[],G.value=0,void wt();const t=Math.max(1,Math.round(60*pe/1e3)),o=[];for(let i=0;i<e.length;i+=t){const n=Math.min(i+t,e.length);let a=0,l=0;for(let t=i;t<n;t+=1){const o=Math.abs(e[t]);o>a&&(a=o),l+=o*o}const r=Math.sqrt(l/Math.max(1,n-i)),s=Math.min(1,1.05*a+1.9*r);o.push(Math.max(4,Math.min(42,Math.round(42*Math.pow(s,.52)))))}U.value=o.slice(-2e3),q.value=[],G.value=0,wt()})(),j.value=Math.min(1e3*ke.value,He(Math.min(ge,t))),H.value=Math.min(1e3*ke.value,He(ge)),bt(),F.value="paused",wt(),Ot()},At=async()=>{if("paused"===F.value)try{await Ct(),be=j.value,ye=je(),_e=0,G.value=(()=>{if(!U.value.length||!H.value)return 0;const e=Math.max(0,U.value.length-1);return Math.max(0,Math.min(e,Math.round(Te.value/H.value*e)))})(),he=[],q.value=[],K.value=!1,F.value="recording",Oe(),kt(),wt()}catch(e){Fe(null==e?void 0:e.message)}},It=()=>{var e,t;"recording"!==F.value?"playing"!==F.value?"paused"===F.value&&At():null==(t=null==(e=$.value)?void 0:e.pause)||t.call(e):Tt()},Lt=()=>{var e,t,o,i;null==(t=null==(e=$.value)?void 0:e.pause)||t.call(e),Be(),ze(),xt(),Ue(),null!=se&&(null==(i=null==(o=R.value)?void 0:o.releasePointerCapture)||i.call(o,se)),se=null,ue=!1,X.value=!1,be=0,ye=0,_e=0,he=[],q.value=[],wt()},Pt=()=>{Lt(),H.value=0,j.value=0,N.value=0,F.value="idle",K.value=!1,G.value=0,ge=0,ve=[],qe(),U.value=[...L],q.value=[],G.value=0,re=0,K.value=!1,wt(),M("recordAddSuccess",null)},Mt=()=>{H.value||U.value.length?O({title:"",content:D("create.confirm_reset_recorded_content"),cancelLabel:D("common.cancel"),confirmLabel:D("editor.reset"),confirm:e=>{e(),Pt()},cancel(e){e()}}):Pt()},Vt=async()=>{var e,t;if(!H.value||"recording"===F.value)return;if("playing"===F.value)return void(null==(t=null==(e=$.value)?void 0:e.pause)||t.call(e));Q.value||bt(),await C();const o=$.value;if(!o)return;const i=Me.value?0:Te.value;o.readyState<1&&await new Promise(e=>{var t;let i=!1;o.addEventListener("loadedmetadata",()=>{i||(i=!0,e())},{once:!0}),window.setTimeout(()=>{i||(i=!0,e())},500),null==(t=o.load)||t.call(o)}),o.currentTime=i/1e3,K.value=!1,wt();try{await o.play()}catch(n){Fe((null==n?void 0:n.message)||"Audio playback failed")}},Dt=()=>{$.value&&"playing"===F.value&&(X.value||(j.value=Math.min(H.value,1e3*$.value.currentTime),wt()))},$t=()=>{ze(),K.value=!0,F.value="paused",X.value||(j.value=H.value,wt())},Rt=()=>{"recording"!==F.value&&(F.value="playing"),K.value=!1,wt(),(()=>{ze();const e=()=>{$.value&&"playing"===F.value?(X.value||(j.value=Math.min(H.value,1e3*$.value.currentTime),wt()),ne=requestAnimationFrame(e)):ne=0};ne=requestAnimationFrame(e)})()},Et=()=>{ze(),"playing"===F.value&&(F.value="paused"),wt()},Ft=e=>{if(null==se||!R.value)return;const t=e.clientX-de,o=Math.max(0,Math.min(H.value,ce-15*t));K.value=!1,N.value=o},Ut=()=>{var e,t;if(null==se)return;const o=ue,i=se;se=null,ue=!1,X.value=!1,null==(t=null==(e=R.value)?void 0:e.releasePointerCapture)||t.call(e,i);const n=$.value;
1n&&(j.value=N.value,n.currentTime=Math.max(0,j.value)/1e3,o&&n.paused&&n.play().catch(e=>Fe((null==e?void 0:e.message)||"Audio playback failed")))},Bt=e=>{var t,o;"recording"!==F.value&&U.value.length&&(e.preventDefault(),ue="playing"===F.value,ue&&$.value&&(j.value=Math.min(H.value,1e3*$.value.currentTime),$.value.pause()),X.value=!0,se=e.pointerId,null==(o=null==(t=R.value)?void 0:t.setPointerCapture)||o.call(t,e.pointerId),de=e.clientX,ce=j.value,N.value=j.value)},Ot=async()=>{if(!Le.value)return;const e=await zt();M("recordAddSuccess",{mode:3,...e})},zt=async()=>{const e=bt()||ht();if(!e)return{url:"",file:null,duration:0};const t=new File([e],"audio.wav",{type:"audio/wav"});return{url:Q.value,file:t,duration:H.value/1e3}};return r({getRecord:zt}),w(()=>"recording"===F.value,e=>{M("tooggleRecord",e)},{immediate:!0}),w([U,Te,F,W,Y],()=>{wt()},{deep:!0}),u(()=>{var e,t,o,i;null==(i=null==(o=null==(t=null==(e=null==V?void 0:V.config)?void 0:e.globalProperties)?void 0:t.$globalMediaUtils)?void 0:o.globalAudioPlayer)||i.tempToggle(!0),C(()=>{yt(),window.ResizeObserver&&R.value&&(we=new ResizeObserver(()=>{yt()}),we.observe(R.value))}),window.addEventListener("pointermove",Ft),window.addEventListener("pointerup",Ut)}),S(()=>{var e,t,o,i,n;window.removeEventListener("pointermove",Ft),window.removeEventListener("pointerup",Ut),null==(e=null==we?void 0:we.disconnect)||e.call(we),we=null,ae&&(cancelAnimationFrame(ae),ae=0),Lt(),Ue(),qe(),null==(n=null==(i=null==(o=null==(t=null==V?void 0:V.config)?void 0:t.globalProperties)?void 0:o.$globalMediaUtils)?void 0:i.globalAudioPlayer)||n.tempToggle(!1)}),(i,r)=>(t(),e("div",Ne,[a("audio",{ref_key:"recordAudioEl",ref:$,class:"clone-voice-record-panel__audio",src:Q.value,preload:"auto",onTimeupdate:Dt,onEnded:$t,onPlay:Rt,onPause:Et},null,40,We),a("div",Ye,["single"===Ae.value.mode?(t(),e("span",Ge,l(Ae.value.single),1)):(t(),e(o,{key:1},[a("span",Qe,l(Ae.value.current),1),r[0]||(r[0]=a("span",{class:"clone-voice-record-panel__timer-separator"}," / ",-1)),a("span",Ke,l(Ae.value.total),1)],64))]),a("div",{class:"clone-voice-record-panel__waveform-stage",onPointerdown:Bt},[a("div",{ref_key:"recordWaveformEl",ref:R,class:"clone-voice-record-panel__waveform"},[a("canvas",{ref_key:"recordWaveformCanvasEl",ref:E,class:"clone-voice-record-panel__waveform-canvas"},null,512),r[1]||(r[1]=a("div",{class:"clone-voice-record-panel__waveform-marker"},null,-1))],512)],32),a("div",Xe,l(Se.value),1),a("div",Je,["idle"===F.value?(t(),e("button",{key:0,class:n(["clone-voice-record-panel__cta-shell",{"clone-voice-record-panel__cta-shell--disabled":Ie.value}]),type:"button","aria-label":"Start recording",disabled:Ie.value,onClick:St},[a("span",et,[g(f(B),{name:"sys-record",size:24})])],10,Ze)):(t(),e(o,{key:1},[a("button",{class:"clone-voice-record-panel__control clone-voice-record-panel__control--secondary",type:"button","aria-label":"Reset recording",onClick:Mt},[g(f(B),{name:"biz-voice-reset",size:20})]),Pe.value&&Me.value?(t(),e("button",tt,[(t(),e("svg",ot,[a("path",{class:"clone-voice-record-panel__cta-progress-path",pathLength:"100",d:"M62 1 H98 A25 25 0 0 1 123 26 A25 25 0 0 1 98 51 H26 A25 25 0 0 1 1 26 A25 25 0 0 1 26 1 H62",style:m(Ee.value)},null,4)])),a("span",it,[g(f(B),{name:"sys-record",size:24})])])):(t(),e("button",{key:1,class:n(["clone-voice-record-panel__cta-shell",{"clone-voice-record-panel__cta-shell--disabled":"playing"===F.value||Ie.value,"clone-voice-record-panel__cta-shell--progressing":"recording"===F.value||"paused"===F.value||"playing"===F.value}]),type:"button",disabled:"playing"===F.value||Ie.value,"aria-label":"recording"===F.value?"Pause recording":"Resume recording",onClick:It},[H.value>0?(t(),e("svg",at,[a("path",{class:"clone-voice-record-panel__cta-progress-path",pathLength:"100",d:"M62 1 H98 A25 25 0 0 1 123 26 A25 25 0 0 1 98 51 H26 A25 25 0 0 1 1 26 A25 25 0 0 1 26 1 H62",style:m(Ee.value)},null,4)])):b("",!0),a("span",lt,["recording"===F.value?(t(),e("span",rt,[a("img",{class:"clone-voice-record-panel__cta-icon-image",src:f(me),alt:""},null,8,st)])):"paused"===F.value||"playing"===F.value?(t(),e("span",dt,l(Ve.value),1)):(t(),e("span",ct,[g(f(B),{name:"sys-play",size:18})]))])],10,nt)),a("button",{class:n(["clone-voice-record-panel__control",{"clone-voice-record-panel__control--disabled":!H.value||"recording"===F.value}]),type:"button","aria-label":"playing"===F.value?"Pause playback":"Play recording",disabled:!H.value||"recording"===F.value,onClick:Vt},["playing"===F.value?(t(),e("span",pt,[g(fe,{class:"clone-voice-record-panel__control-loader",size:{width:"20px",height:"16px"},"bar-config":{barWidth:"2px",barHeight:"12px",barSpacing:"2px",barColor:"#48e1eb"},animation:!0}),a("img",{class:"clone-voice-record-panel__control-icon-image clone-voice-record-panel__control-icon-image--pause",src:f(me),alt:""},null,8,gt)])):(t(),h(f(B),{key:1,name:"sys-play",size:20}))],10,ut)],64))])]))}},mt=[{key:"en",keyLang:"en",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/en-C9YvM18D.svg",label:"English",label_en:"English","label_zh-Hans":"英语","label_zh-Hant":"英語",label_ja:"英語",label_ko:"영어",label_es:"Inglés",label_pt:"Inglês",label_de:"Englisch",label_fr:"Anglais",label_it:"Inglese",label_ru:"Английский"},{key:"zh-CN",keyLang:"zh-Hans",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/zh-hans-Bso9xJNS.svg",label:"中文(简体)",label_en:"Simplified Chinese","label_zh-Hans":"中文(简体)","label_zh-Hant":"簡體中文",label_ja:"簡体字中国語",label_ko:"중국어(간체)",label_es:"Chino simplificado",label_pt:"Chinês simplificado",label_de:"Vereinfachtes Chinesisch",label_fr:"Chinois simplifié",label_it:"Cinese semplificato",label_ru:"Упрощённый китайский"},{key:"zh-TW",keyLang:"zh-Hant",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/zh-hans-Bso9xJNS.svg",label:"中文(繁體)",label_en:"Traditional Chinese","label_zh-Hans":"中文(繁体)","label_zh-Hant":"繁體中文",label_ja:"繁体字中国語",label_ko:"중국어(번체)",label_es:"Chino tradicional",label_pt:"Chinês tradicional",label_de:"Traditionelles Chinesisch",label_fr:"Chinois traditionnel",label_it:"Cinese tradizionale",label_ru:"Традиционный китайский"},{key:"ja",keyLang:"ja",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/ja-DEmdi14j.svg",label:"日本語",label_en:"Japanese","label_zh-Hans":"日语","label_zh-Hant":"日語",label_ja:"日本語",label_ko:"일본어",label_es:"Japonés",label_pt:"Japonês",label_de:"Japanisch",label_fr:"Japonais",label_it:"Giapponese",label_ru:"Японский"},{key:"ko",keyLang:"ko",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/ko-y9bfMwYJ.svg",label:"한국어",label_en:"Korean","label_zh-Hans":"韩语","label_zh-Hant":"韓語",label_ja:"韓国語",label_ko:"한국어",label_es:"Coreano",label_pt:"Coreano",label_de:"Koreanisch",label_fr:"Coréen",label_it:"Coreano",label_ru:"Корейский"},{key:"es",keyLang:"es",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/es-CZEYDNyq.svg",label:"Español",label_en:"Spanish","label_zh-Hans":"西班牙语","label_zh-Hant":"西班牙語",label_ja:"スペイン語",label_ko:"스페인어",label_es:"Español",label_pt:"Espanhol",label_de:"Spanisch",label_fr:"Espagnol",label_it:"Spagnolo",label_ru:"Испанский"},{key:"pt",keyLang:"pt",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/pt-CnXXXkyN.svg",label:"Português",label_en:"Portuguese","label_zh-Hans":"葡萄牙语","label_zh-Hant":"葡萄牙語",label_ja:"ポルトガル語",label_ko:"포르투갈어",label_es:"Portugués",label_pt:"Português",label_de:"Portugiesisch",label_fr:"Portugais",label_it:"Portoghese",label_ru:"Португальский"},{key:"de",keyLang:"de",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/de-BO6acSTW.svg",label:"Deutsch",label_en:"German","label_zh-Hans":"德语","label_zh-Hant":"德語",label_ja:"ドイツ語",label_ko:"독일어",label_es:"Alemán",label_pt:"Alemão",label_de:"Deutsch",label_fr:"Allemand",label_it:"Tedesco",label_ru:"Немецкий"},{key:"fr",keyLang:"fr",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/fr-BA9le1zS.svg",label:"Français",label_en:"French","label_zh-Hans":"法语","label_zh-Hant":"法語",label_ja:"フランス語",label_ko:"프랑스어",label_es:"Francés",label_pt:"Francês",label_de:"Französisch",label_fr:"Français",label_it:"Francese",label_ru:"Французский"},{key:"it",keyLang:"it",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/it-BLUrFaUn.svg",label:"Italiano",label_en:"Italian","label_zh-Hans":"意大利语","label_zh-Hant":"義大利語",label_ja:"イタリア語",label_ko:"이탈리아어",label_es:"Italiano",label_pt:"Italiano",label_de:"Italienisch",label_fr:"Italien",label_it:"Italiano",label_ru:"Итальянский"}
1,{key:"ru",keyLang:"ru",ico:"https://static-cos.mureka.ai/cos-prod/mureka/static/svg/ru-D8CWB468.svg",label:"Русский язык",label_en:"Russian","label_zh-Hans":"俄语","label_zh-Hant":"俄語",label_ja:"ロシア語",label_ko:"러시아어",label_es:"Ruso",label_pt:"Russo",label_de:"Russisch",label_fr:"Russe",label_it:"Russo",label_ru:"Русский"}],ft=e=>mt.find(t=>t.key===e)??null,ht={class:"tts-clone-voice-confirm-clause"},bt={class:"tts-clone-voice-confirm-clause-content-text"},yt={key:0,class:"tts-clone-voice-confirm-clause-validatate"},_t={__name:"cloneVoiceConfirmItems",props:{isAgree:{type:Boolean,default:!1}},emits:[],setup(o,{expose:i,emit:d}){var p,g,v;r(),s();const m=null==(v=null==(g=(_()||(null==(p=null==window?void 0:window.$getVueCurrentInstance)?void 0:p.call(window))).appContext)?void 0:g.config)?void 0:v.globalProperties,{$$language:h,$$t:y,$$tm:w,$$tValue:k}=(null==m?void 0:m.$i18n)??{},C=c({isAgree:o.isAgree}),S=()=>{window.open(`${window.location.origin}${"en"==h()?"":`/${h()}`}/terms`,"_blank")},A=()=>{window.open(`${window.location.origin}${"en"==h()?"":`/${h()}`}/privacy`,"_blank")},I=()=>C.isAgree?(C.validatateMsg="",!0):(C.validatateMsg=y("tts.please_agree_to_the_terms"),!1),L=()=>{C.isAgree=!C.isAgree,I()};return i({getIsAgree:()=>C.isAgree,validata:I}),u(()=>{}),(o,i)=>(t(),e("div",ht,[a("div",{class:"tts-clone-voice-confirm-clause-content flex",onClick:L},[a("div",{class:n(["tts-clone-voice-confirm-clause-content-select flex-center",{active:C.isAgree}])},[...i[0]||(i[0]=[a("i",{class:"block"},null,-1)])],2),a("div",bt,[x(l(f(y)("tts.clone_voice_confirm_clause"))+" ",1),a("a",{class:"pointer",onClick:T(S,["stop"])},l(f(y)("login.terms_of_use")),1),x(" "+l(f(y)("login.and"))+" ",1),a("a",{class:"pointer",onClick:T(A,["stop"])},l(f(y)("login.privacy_policy")),1)])]),C.validatateMsg?(t(),e("div",yt,l(C.validatateMsg),1)):b("",!0)]))}},wt={key:0,class:"design-voice-info-audio-bar-box flex"},xt={class:"design-voice-info-label flex"},kt={class:"design-voice-info-label-text"},Ct={key:0,class:"design-voice-info-error fn-inline"},St={class:"design-voice-info-cover"},Tt={class:"design-voice-info-label flex"},At={class:"design-voice-info-label-text"},It={key:0,class:"design-voice-info-error fn-inline"},Lt=["placeholder","value"],Pt={class:"design-voice-info-edit-count"},Mt={class:"design-voice-info-label flex"},Vt={class:"design-voice-info-label-text"},Dt={key:0,class:"design-voice-info-error fn-inline"},$t={class:"design-voice-info-edit-select flex"},Rt={class:"design-voice-info-label flex"},Et={class:"design-voice-info-label-text"},Ft={key:0,class:"design-voice-info-error fn-inline"},Ut={class:"design-voice-info-edit flex"},Bt=["placeholder","value"],Ot={class:"design-voice-info-edit-count"},zt={class:"design-voice-info-done-btn-box flex"},qt={class:"design-voice-info-back-btn"},Ht={class:"design-voice-info-done-btn"},jt={__name:"designVoiceBasicInfoDialog",props:{renderType:{type:String,default:""},type:{type:String,default:null},voiceInfo:{type:Object,default:null},visible:{type:Boolean,default:!0}},emits:["update:visible","saveVoiceSuccess","close"],setup(o,{emit:i}){var r,s,p,m,k,C,S,T,I,L;const P=F(),{createRenderType:M}=y(P),V=null==(p=null==(s=(_()||(null==(r=null==window?void 0:window.$getVueCurrentInstance)?void 0:r.call(window))).appContext)?void 0:s.config)?void 0:p.globalProperties,{$$language:D,$$t:R,$$tm:E,$$tValue:B}=(null==V?void 0:V.$i18n)??{};null==(S=null==(C=null==(k=(_()||(null==(m=null==window?void 0:window.$getVueCurrentInstance)?void 0:m.call(window))).appContext)?void 0:k.config)?void 0:C.globalProperties)||S.$router;const O=o,z=i,W=d(null),Y=d(null),G=d(null),Q=d(null),K=c({visible:O.visible,voiceInfo:O.voiceInfo,cover:(null==(T=O.voiceInfo)?void 0:T.cover)??"",title:"",description:(null==(I=O.voiceInfo)?void 0:I.content)??(null==(L=O.voiceInfo)?void 0:L.description)??"",language:null,isLoading:!1}),X=c({validataCover:"",validataTitle:"",validataLanguage:"",validataDescription:""}),J=e=>{pe.validataLanguage(null==e?void 0:e.key)},Z=e=>{var t;
1null==(t=W.value)||t.focus()},ee=()=>{K.inputing=!0},te=e=>{K.inputing=!1,oe(e)},oe=e=>{K.inputing||(e.target.value.length>50&&(e.target.value=e.target.value.slice(0,50)),K.title=e.target.value,z("update:title",K.title),pe.validataTitle(K.title))},ie=e=>{z("update:title",K.title)},ne=()=>{K.inputingTextarea=!0},ae=e=>{K.inputingTextarea=!1,re(e)},le=()=>{var e,t,o;(null==(e=K.voiceInfo)?void 0:e.mp3_url)||(2==(null==(t=K.voiceInfo)?void 0:t.machine_audit_state)?H.info({position:"top",content:R("create.song_state_auditing")}):4==(null==(o=K.voiceInfo)?void 0:o.machine_audit_state)&&H.info({position:"top",content:R("tts.audio_state_auditing_failed_disabled")}))},re=e=>{K.inputingTextarea||(e.target.value.length>500&&(e.target.value=e.target.value.slice(0,500)),K.description=e.target.value,z("update:description",K.description),pe.validataDescription(K.description))},ue=e=>{z("update:description",K.description),pe.validataDescription(K.description)},pe={validataCover:e=>e?(X.validataCover="",!0):(X.validataCover=R("create.this_field_is_required"),!1),validataTitle:e=>e?(X.validataTitle="",!0):(X.validataTitle=R("create.this_field_is_required"),!1),validataLanguage:e=>e?(X.validataLanguage="",!0):(X.validataLanguage=R("create.this_field_is_required"),!1),validataDescription:e=>e?(X.validataDescription="",!0):(X.validataDescription=R("create.this_field_is_required"),!1)},ge=()=>{K.visible=!1,z("update:visible",!1),z("cancel")},ve=e=>{X.validataCover=e?"":R("create.this_field_is_required")},me=async()=>{var e,t,o;let i=pe.validataTitle(K.title),n=pe.validataDescription(K.description),a=pe.validataLanguage(K.language);try{if(K.imageData=await(null==(e=G.value)?void 0:e.getClipImageData()),!(null==(t=K.imageData)?void 0:t.file))return void(X.validataCover=R("create.this_field_is_required"));X.validataCover=""}catch(l){return void(X.validataCover=R("create.this_field_is_required"))}("clone"!=O.type||(null==(o=Q.value)?void 0:o.validata()))&&a&&i&&n&&(((e,t)=>{var o;(_()||(null==(o=null==window?void 0:window.$getVueCurrentInstance)?void 0:o.call(window))).appContext.config.globalProperties.logCustomEvent(e,{...t})})("clone"==O.type?"clone_voice_save_click":"design_voice_save_click",{source:"index"==O.renderType?"from_voice_library":"from_text_to_speech"}),K.isLoading=!0,fe(K.imageData).then(e=>{_e(null==e?void 0:e.pathKey).then(e=>{K.isLoading=!1}).catch(e=>{K.isLoading=!1})}).catch(e=>{K.isLoading=!1}))},fe=(e,t)=>new Promise(async(o,i)=>{if(e.changed||!e.pathKey)try{o(await N.uploadFileToObjectStorage(e.file,e=>{null==t||t(e)}))}catch(n){i(n)}else o({pathKey:e.pathKey,fullUrl:$(e.pathKey)})}),be=(e,t)=>{var o;(_()||(null==(o=null==window?void 0:window.$getVueCurrentInstance)?void 0:o.call(window))).appContext.config.globalProperties.logCustomEvent(name,{...t})},_e=async e=>new Promise((t,o)=>{var i,n;j.saveTtsVoiceinfo({voice_id:null==(i=O.voiceInfo)?void 0:i.id,title:K.title,description:K.description,language:null==(n=K.language)?void 0:n.key,cover:e}).then(e=>{200===e.code?(z("saveVoiceSuccess",e.data),H.success({content:R("create.save_success"),position:"top"}),t(e.data),be(0,{result:1})):6315===e.code?(H.success({content:"当前输入音频违反政策,请修改后重试",position:"top"}),be(0,{result:3}),t(e)):6316===e.code?(H.success({content:"当前输入内容违反政策,请修改后重试",position:"top"}),be(0,{result:3}),t(e)):6320===e.code?(H.success({content:"当前音色封面违反政策,请修改后重试",position:"top"}),be(0,{result:3}),t(e)):6388==(null==e?void 0:e.code)?H.error({position:"top",content:R("create.copyright_protected_content")}):(H.error({content:R("create.save_failed"),position:"top"}),be(0,{result:3}),o(e))}).catch(e=>{H.error({content:R("create.save_failed"),position:"top"}),be(0,{result:3}),o(e)})}),we=()=>{K.visible=!1,z("close")},xe={},ke=e=>{var t;null==(t=xe.registPollingCall)||t.call(xe),e&&se.appname==de&&(xe.lastPollingCallId=e,xe.registPollingCall=ce.registPolling(()=>{var t;(t={id:e,type:1},new Promise((e,o)=>{j.getTtsVoiceStatus(t).then(o=>{K.voiceInfo.id==t.id&&(K.voiceInfo={...K.voiceInfo,...o.data}),e(o.data)}).catch(e=>{o(e)})})).then(e=>{var t,o,i;
1K.voiceInfo.id==xe.lastPollingCallId&&((null==(t=K.voiceInfo)?void 0:t.mp3_url)||[1,3,4].includes(null==(o=K.voiceInfo)?void 0:o.machine_audit_state))&&(null==(i=xe.registPollingCall)||i.call(xe))})},5e3,!1))};return w(()=>O.visible,e=>{var t;K.visible=O.visible,K.description=O.description,O.visible&&(null==(t=W.value)||t.focus())}),w(()=>K.visible,e=>{z("update:visible",e)}),u(()=>{var e,t;null==(e=W.value)||e.focus(),O.voiceInfo&&!(null==(t=O.voiceInfo)?void 0:t.mp3_url)&&ke(O.voiceInfo.id)}),A(()=>{var e;null==(e=xe.registPollingCall)||e.call(xe)}),(o,i)=>(t(),h(q,{width:"720px",height:"unset","title-align":"left",title:"clone"==O.type?f(R)("tts.voice_clone"):f(R)("tts.vioce_design"),visible:K.visible,"mobile-render-type":"drawerDialog",onClose:we},{default:v(()=>{var o,r;return[a("div",{class:n(["design-voice-info flex-column",{"design-voice-info--mobile":"mobile"==f(M)}])},["clone"==O.type?(t(),e("div",wt,[g(Be,{"voice-info":K.voiceInfo,"hide-remove":!0,onTogglePlay:le},null,8,["voice-info"])])):b("",!0),a("div",xt,[a("label",kt,[x(l(f(R)("create.cover"))+" ",1),X.validataCover?(t(),e("span",Ct," ( "+l(X.validataCover)+" ) ",1)):b("",!0)])]),a("div",St,[g(ye,{ref_key:"refUploadClipImage",ref:G,"img-url":(null==K?void 0:K.cover)?f($)(K.cover):"","image-explain":f(R)("create.song_publish_image_explain"),"allow-replace-by-preview-click":!0,onUrlChange:ve},null,8,["img-url","image-explain"])]),a("div",Tt,[a("label",At,[x(l(f(R)("tts.voice_name"))+" ",1),X.validataTitle?(t(),e("span",It," ( "+l(X.validataTitle)+" ) ",1)):b("",!0)])]),a("div",{class:"design-voice-info-edit-input flex",onClick:Z},[a("input",{ref_key:"refInput",ref:W,placeholder:f(R)("tts.voice_name_placeholder"),class:"flex1 width-0",value:K.title,onInput:oe,onChange:ie,onCompositionstart:ee,onCompositionend:te},null,40,Lt),a("div",Pt,l((null==(o=K.title)?void 0:o.length)??0)+"/ "+l(50),1)]),a("div",Mt,[a("label",Vt,[x(l(f(R)("common.language"))+" ",1),X.validataLanguage?(t(),e("span",Dt," ( "+l(X.validataLanguage)+" ) ",1)):b("",!0)])]),a("div",$t,[g(he,{modelValue:K.language,"onUpdate:modelValue":i[0]||(i[0]=e=>K.language=e),"value-key":"key",placeholder:f(R)("common.language"),"label-key":`label_${f(D)()}`,options:f(mt),onChange:J},null,8,["modelValue","placeholder","label-key","options"])]),a("div",Rt,[a("label",Et,[x(l(f(R)("tts.description"))+" ",1),X.validataDescription?(t(),e("span",Ft," ( "+l(X.validataDescription)+" ) ",1)):b("",!0)])]),a("div",Ut,[a("textarea",{ref_key:"refPreviewInput",ref:Y,placeholder:f(R)("tts.description_placeholder"),class:"flex1 width-0",value:K.description,onCompositionstart:ne,onCompositionend:ae,onInput:re,onChange:ue},null,40,Bt),a("div",Ot,l((null==(r=K.description)?void 0:r.length)??0)+"/ "+l(500),1)]),"clone"==O.type?(t(),h(_t,{key:1,ref_key:"refCloneVoiceConfirmItems",ref:Q},null,512)):b("",!0),a("div",zt,[a("div",qt,[g(f(U),{type:"ghost",onClick:ge},{default:v(()=>[x(l(f(R)("library.Back")),1)]),_:1})]),a("div",Ht,[g(f(U),{loading:K.isLoading,onClick:me},{default:v(()=>[x(l(f(R)("tts.save_voice")),1)]),_:1},8,["loading"])])])],2)]}),_:1},8,["title","visible"]))}},Nt={key:0,class:"clone-tts-voice-new-corner-mark"},Wt={class:"block"},Yt={class:"clone-tts-voice-file-selectfile pointer"},Gt={class:"clone-tts-voice-file-desc tc"},Qt={__name:"addFile",props:{},emits:["generateSuccess","showSubscribeDialog"],setup(o,{emit:i}){var r,s,p,v,m;const w=F(),x=E(),{createRenderType:S,vocalCornerMarkVisible:T}=y(w);W(),Y(),null==(v=null==(p=null==(s=(_()||(null==(r=null==window?void 0:window.$getVueCurrentInstance)?void 0:r.call(window))).appContext)?void 0:s.config)?void 0:p.globalProperties)||v.$router;const A=_e(),{$$language:I,$$t:L,$$tm:P,$$tValue:M}=(null==(m=_().appContext)?void 0:m.config.globalProperties.$i18n)??{},V=d(null),D=d(null);d(null);const $=i,R=k(()=>{var e,t,o,i;return!(null==(t=null==(e=x.userInfo)?void 0:e.user)?void 0:t.is_vip)||"basic"==(null==(i=null==(o=x.userInfo)?void 0:o.user)?void 0:i.vip_level_name)}),U=["audio/x-wav","video/quicktime","video/mp4","audio/wav","audio/x-m4a","audio/flac","audio/mpeg",".mp3",".wav",".m4a",".mp4",".mov",".MP4",".flac"],O=c({ifRenderFilePond:!0,files:[],file:null,acceptedFileTypes:U}),z=()=>{V.value&&(C(()=>{var e;null==(e=D.value)||e.$el.querySelector(".filepond--drop-label").appendChild(V.value)}),setTimeout(()=>{var e,t,o;null==(o=null==(t=null==(e=D.value)?void 0:e.$el)?void 0:t.querySelector("input"))||o.setAttribute("accept",O.acceptedFileTypes.join(","))},20))},q=(e,t,o)=>{e||j(t.file,2).then(()=>{$("fileAddSuccess",{file:O.file,duration:O.duration,mode:2})})},j=(e,t=1)=>new Promise(async(t,o)=>{let i=(e=>e.type.toLocaleLowerCase().startsWith("audio")?U.includes(e.type.toLocaleLowerCase())?"audio":"unknown":e.type.toLocaleLowerCase().startsWith("video")&&U.includes(e.type.toLocaleLowerCase())?"video":"unknown")(e);if("unknown"==i)return H.info({position:"top",content:L("create.select_audio_or_video")}),void o("not audio");let n=null;if(e instanceof File?n=e:(e.target.files&&e.target.files.length>0&&(n=e.target.files[0]),O.ifRenderFilePond=!1,O.files=[]),C(()=>{O.ifRenderFilePond=!0,C(()=>{z()})}),n){if(n.size>104857600)return H.info({position:"top",content:L("create.max_file_size")}),void o("max file size");try{const e=await ce.getMediaFileDuration(n);if(!(e>0))return H.info({position:"top",content:L("create.select_audio_or_video")}),void o("not audio");e<5?(H.info({position:"top",content:M("create.min_file_duration",{duration:5})}),o("min file duration")):(O.duration=e,O.file=n,t())}catch(a){try{const e=await G.transFileToMp3(n);let i=0;if(e&&(i=await ce.getMediaFileDuration(e.file)),!(i>0))return H.info({position:"top",content:L("create.select_audio_or_video")}),void o("not audio");i<5?(H.info({position:"top",content:M("create.min_file_duration",{duration:5})}
1),o("min file duration")):(O.duration=i,O.file=e.file,t())}catch(l){H.info({position:"top",content:L("video"==i?"create.select_video_error":"create.select_audio_error")}),o("not audio")}}}});return u(()=>{C(()=>{z()})}),(o,i)=>(t(),e("div",{class:n(["clone-tts-voice-file-container",{[`clone-tts-voice-file-container--${f(S)}`]:!0,"clone-tts-voice-file-cn":f(se).appname==f(de)}])},[O.ifRenderFilePond?(t(),h(f(A),{key:0,ref_key:"refUpload",ref:D,"label-idle":"歌曲文件","allow-multiple":!1,"accepted-file-types":O.acceptedFileTypes.join(","),files:O.files,onHandleAfterRead:j,onAddfile:q},null,8,["accepted-file-types","files"])):b("",!0),a("div",{ref_key:"refUploadContent",ref:V,class:"clone-tts-voice-file-main"},[f(T)?(t(),e("div",Nt,[a("span",Wt,l(f(L)("common.new")),1)])):b("",!0),a("div",Yt,[g(f(B),{name:"sys-editor-upload",size:48})]),a("div",Gt,l(f(L)("tts.upload_audio_file_desc")),1)],512),R.value?(t(),e("div",{key:1,class:"add-music-reference-edit-mask pointer",onClick:i[0]||(i[0]=e=>{$("showSubscribeDialog","reference",{membership_source1:"tts",membership_source2:"tts_clone_voice"})})})):b("",!0)],2))}},Kt={key:0,class:"clone-tts-voice-new-corner-mark"},Xt={class:"block"},Jt={class:"clone-tts-voice-record-desc tc"},Zt={__name:"addRecord",props:{},emits:["doAddReferenceRecord"],setup(o,{emit:i}){var r,d,p,v,m,h;const w=F(),x=E(),{createRenderType:C,vocalCornerMarkVisible:S}=y(w);null==(v=null==(p=null==(d=(_()||(null==(r=null==window?void 0:window.$getVueCurrentInstance)?void 0:r.call(window))).appContext)?void 0:d.config)?void 0:p.globalProperties)||v.$router,s();const{$$language:T,$$t:A,$$tm:I,$$tValue:L}=(null==(m=_().appContext)?void 0:m.config.globalProperties.$i18n)??{},P=(_()||(null==(h=null==window?void 0:window.$getVueCurrentInstance)?void 0:h.call(window))).appContext,M=i;c({file:null});const V=k(()=>{var e,t,o,i;return!(null==(t=null==(e=x.userInfo)?void 0:e.user)?void 0:t.is_vip)||"basic"==(null==(i=null==(o=x.userInfo)?void 0:o.user)?void 0:i.vip_level_name)}),D=()=>{var e,t,o,i,n,a,l,r;null==(r=null==(o=null==(t=null==(e=null==P?void 0:P.config)?void 0:e.globalProperties)?void 0:t.$globalMediaUtils)?void 0:o.globalAudioPlayer)||r.pause(null==(l=null==(a=null==(n=null==(i=null==P?void 0:P.config)?void 0:i.globalProperties)?void 0:n.$globalMediaUtils)?void 0:a.globalAudioPlayer)?void 0:l.currentUrl),M("doAddReferenceRecord")};return u(()=>{}),(o,i)=>(t(),e("div",{class:n(["clone-tts-voice-record-container",{[`clone-tts-voice-record-container--${f(C)}`]:!0,"clone-tts-voice-record-container--cn":f(se).appname==f(de)}])},[a("div",{class:"clone-tts-voice-record-main",onClick:D},[f(S)?(t(),e("div",Kt,[a("span",Xt,l(f(A)("common.new")),1)])):b("",!0),a("div",{class:n(["clone-tts-voice-record pointer",{[`clone-tts-voice-record--${f(C)}`]:!0}])},[g(f(B),{name:"sys-record-ico",size:48})],2),a("div",Jt,l(f(A)("tts.record_audio_desc")),1),V.value?(t(),e("div",{key:1,class:"add-music-reference-edit-mask pointer",onClick:i[0]||(i[0]=e=>{M("showSubscribeDialog","reference",{membership_source1:"tts",membership_source2:"tts_clone_voice_record"})})})):b("",!0)])],2))}},eo={class:"clone-voice-dialog-description"},to={key:0,class:"clone-voice-dialog-add flex"},oo={class:"clone-voice-dialog-add-item"},io={class:"clone-voice-dialog-add-item"},no={key:1,class:"clone-voice-recoder-box"},ao={key:3,class:"clone-voice-dialog-hint flex"},lo={class:"clone-voice-dialog-hint-item clone-voice-dialog-hint-item1 flex"},ro={class:"clone-voice-dialog-hint-item clone-voice-dialog-hint-item2 flex"},so={class:"clone-voice-dialog-hint-item clone-voice-dialog-hint-item3 flex"},co={class:"clone-voice-dialog-done-btn-box"},uo={key:0},po={key:1},go={key:2},vo={__name:"cloneVoiceDialog",props:{renderType:{type:String,default:"dialog"},visible:{type:Boolean,default:!0}},emits:["update:visible","saveVoiceSuccess","cancel","showSubscribeDialog"],setup(i,{emit:r}){var s;const p=W(),x=F(),{createRenderType:k}=y(x),C=E(),S=Q(),{$$t:T,$$tValue:A}=(null==(s=_().appContext)?void 0:s.config.globalProperties.$i18n)??{},I=i,L=r,P=d(null),M=c({stepState:1,visible:I.visible,addPromptBasicInfoDialogVisible:!1,isLoading:!1,isRecording:!1}),V=(e,t)=>{var o;
1(_()||(null==(o=null==window?void 0:window.$getVueCurrentInstance)?void 0:o.call(window))).appContext.config.globalProperties.logCustomEvent(e,{...t})},D=()=>{M.stepState=1,M.voiceFileInfo=null},$=({membership_source1:e,membership_source2:t})=>{L("showSubscribeDialog","reference",{membership_source1:e??"tts",membership_source2:t??"tts_clone_voice"})},R=({file:e,duration:t,mode:o})=>{M.stepState=3,M.voiceFileInfo={mode:o,name:e.name,duration:t,duration_milliseconds:1e3*t,file:e,mp3_url:window.URL.createObjectURL(e)}},U=e=>{if(!(null==e?void 0:e.file))return void(M.voiceFileInfo=null);const{mode:t,file:o,duration:i,url:n}=e;M.voiceFileInfo={mode:t,name:o.name,duration:i,duration_milliseconds:1e3*i,file:o,mp3_url:n}},O=e=>{M.isRecording=e,e&&(M.voiceFileInfo=null)},z=()=>{M.visible=!1},Y=()=>{M.stepState=2},K=(e,t)=>{var o;(_()||(null==(o=null==window?void 0:window.$getVueCurrentInstance)?void 0:o.call(window))).appContext.config.globalProperties.logCustomEvent(e,{...t})},X=async e=>{var t,o;if(null==(t=M.voiceFileInfo)?void 0:t.file){M.isLoading=!0,M.timeScamp=(new Date).getTime(),M.duration=M.voiceFileInfo.duration;try{const t=await(async e=>new Promise((t,o)=>{const i=H.info({position:"center",content:T("mine.uploading")});(async()=>{var n;try{if(!pe.isMP3ByMimeType(e.type)&&!pe.isMP3ByExtension(e.name))try{const t=await G.transFileToMp3(e);e=t.file}catch(a){}const o=await N.uploadFileToObjectStorage(e,e=>{M.uploadCallbackData=e}),l={title:null==(n=e.name)?void 0:n.replace(/.[a-zA-Z0-9]+$/,"").slice(0,50),cos_url:o.pathKey,duration_milliseconds:Math.round(1e3*M.duration)};i.clear(),t(l)}catch(a){i.clear(),H.error({position:"top",content:T("create.upload_failed")}),o(a)}})()}))(M.voiceFileInfo.file),i=await J(t,e);M.voiceInfo=i,M.addPromptBasicInfoDialogVisible=!0,3===M.stepState&&(null==(o=P.value)||o.togglePlay(!1))}finally{M.isLoading=!1}}},J=async(e,t)=>new Promise((o,i)=>{const n=H.info({position:"center",content:T("mine.uploading")});M.isGenerateLoading=!0,j.generateTtsVoice({mode:t,url:e.cos_url,duration_milliseconds:e.duration_milliseconds}).then(e=>{var a,l,r;C.refreshUserAccount(!0),n.clear(),200==e.code?(M.voiceInfo={title:"voice",prompt:M.prompt,content:M.previewPrompt,...e.data},o(M.voiceInfo),K("speech_add_ro_try_voice_cloning_upload_audio",{result:1})):[6335,6303,6310].includes(e.code)?(p.goCredits(e.code,{membership_source1:"tts",membership_source2:"tts_clone_voice"}),K("speech_add_ro_try_voice_cloning_upload_audio",{result:3}),i(e)):6108==e.code?(H.error({position:"top",content:T("tts.generate_description_audit_failed")}),K("speech_add_ro_try_voice_cloning_upload_audio",{result:3}),i(e)):6346==e.code?(H.error({content:A("tts.voice_min_duration",{duration:5})}),K("speech_add_ro_try_voice_cloning_upload_audio",{result:3}),i(e)):6315==e.code?H.error({position:"top",content:"当前输入音频违反政策,请修改后重试"}):6316==e.code?(H.error({position:"top",content:"当前输入内容违反政策,请修改后重试"}),K("speech_add_ro_try_voice_cloning_upload_audio",{result:3}),i(e)):6388==(null==e?void 0:e.code)?(H.error({position:"top",content:T("create.copyright_protected_content")}),K("speech_add_ro_try_voice_cloning_upload_audio",{result:2}),i(e)):(H.error({position:"top",content:T("tts.voice_generate_failed")}),K("speech_add_ro_try_voice_cloning_upload_audio",{result:3}),i("generate_failed")),V("clone_voice_generate_result",{tab_stare:2==t?"file":"record",source:"index"==I.renderType?"from_voice_library":"from_text_to_speech",content:M.prompt,result:200==e.code?1:0,duration:(((null==(a=e.data)?void 0:a.duration_milliseconds)??0)/1e3).toFixed(2),stay_time:(((new Date).getTime()-M.timeScamp)/1e3).toFixed(2),generate_time:(((null==(l=e.data)?void 0:l.finished_at)??0)-((null==(r=e.data)?void 0:r.created_at)??0)).toFixed(2)})}).catch(e=>{n.clear(),H.error({position:"top",content:T("tts.voice_generate_failed")}),K("speech_add_ro_try_voice_cloning_upload_audio",{result:3}),i(e),V("clone_voice_generate_result",{tab_stare:2==t?"file":"record",source:"index"==I.renderType?"from_voice_library":"from_text_to_speech",content:M.prompt,result:0,duration:"0",stay_time:(((new Date).getTime()-M.timeScamp)/1e3).toFixed(2)})}).finally(()=>{M.isGenerateLoading=!1})}),Z=async()=>{switch(M.stepState){case 1:break;case 2:V("clone_voice_generate_click",{source:"index"==I.renderType?"from_voice_library":"from_text_to_speech",tab_stare:"record"}),await X(3);break;case 3:V("clone_voice_generate_click",{source:"index"==I.renderType?"from_voice_library":"from_text_to_speech",tab_stare:"file"}),await X(2)}},ee=()=>{M.stepState=1,M.voiceFileInfo=null,M.isRecording=!1},te=()=>{M.visible=!1},oe=e=>{L("saveVoiceSuccess",e,"clone"),M.addPromptBasicInfoDialogVisible=!1,M.visible=!1};return w(()=>I.visible,()=>{M.visible=I.visible}),w(()=>M.visible,e=>{L("update:visible",e)}),u(()=>{V("clone_voice_show",{source:"index"==I.renderType?"from_voice_library":"from_text_to_speech"})}),(i,r)=>(t(),e(o,null,[g(q,{width:"720px",height:"unset","title-align":"left",title:f(T)("tts.voice_clone"),visible:M.visible,"mobile-render-type":"drawerDialog",onClose:te},{default:v(()=>{var o;return[a("div",{class:n(["height-all clone-voice-dialog-content flex-column",{"clone-voice-dialog--mobile":"mobile"==f(k)}])},[a("div",eo,l(f(T)("tts.tts_clone_to_voice_subtitle")),1),1==M.stepState?(t(),e("div",to,[a("div",oo,[g(Qt,{onShowSubscribeDialog:$,onFileAddSuccess:R})]),a("div",io,[g(Zt,{onShowSubscribeDialog:$,onDoAddReferenceRecord:Y})])])):b("",!0),2==M.stepState?(t(),e("div",no,[g(vt,{ref:"refCloneRecorder",onTooggleRecord:O,onRecordAddSuccess:U},null,512)])):b("",!0),3===M.stepState?(t(),e("div",{key:2,class:"clone-voice-audio-bar-box flex",style:m({opacity:M.isLoading?.5:1})},[g(Be,{ref_key:"refAudioBar",ref:P,"voice-info":M.voiceFileInfo,onRemove:D},null,8,["voice-info"])],4)):b("",!0),M.stepState<3?(t(),e("div",ao,[a("div",lo,[g(f(B),{name:"sys-ear-off-ico",size:16,opacity:.7,color:"#fff"}),a("span",null,l(f(T)("tts.avoid_background_noise")),1)]),a("div",ro,[g(f(B),{name:"sys-melody-ico",size:16,opacity:.7,color:"#fff"}),a("span",null,l(f(T)("tts.avoid_single_or_melody")),1)]),a("div",so,[g(f(B),{name:"biz-voice-upload-track",size:16,opacity:.7,color:"#fff"}),a("span",null,l(f(T)("tts.speak_clearly_and_evenly")),1)])])):b("",!0),a("div",co,[g(je,{"show-left-button":M.stepState>1&&3!==M.stepState,disabled:2===M.stepState?M.isRecording||!(null==(o=M.voiceFileInfo)?void 0:o.file):M.stepState<3,"button-text":f(T)("tts.generate_voice"),onOnLeftButtonClick:ee,onOnClick:Z},{text:v(()=>[f(S).free_tts_duration?(t(),e("label",uo,l(f(T)("tts.free_speech_generation_time",{min:f(S).free_tts_duration})),1)):b("",!0),f(S).free_tts_duration?b("",!0):(t(),e("label",po,l(`${f(T)("create.credits_remaining")} `),1)),f(S).free_tts_duration?b("",!0):(t(),e("span",go,l(f(C).credits??0),1))]),_:1},8,["show-left-button","disabled","button-text"])])],2)]}),_:1},8,["title","visible"]),M.addPromptBasicInfoDialogVisible?(t(),h(jt,{key:0,visible:M.addPromptBasicInfoDialogVisible,"onUpdate:visible":r[0]||(r[0]=e=>M.addPromptBasicInfoDialogVisible=e),"render-type":I.renderType,"voice-info":M.voiceInfo,type:"clone",onSaveVoiceSuccess:oe,onClose:z},null,8,["visible","render-type","voice-info"])):b("",!0)],64))}},mo={key:0,class:"add-tts-voice-new-corner-mark"},fo={class:"block"},ho={class:"add-tts-voice-file-desc-box"},bo={class:"add-tts-voice-file-title flex"},yo={key:0,class:"block olh"},_o={key:1,class:"block olh"},wo={class:"add-tts-voice-file-desc omlh-2"},xo={__name:"addFile",props:{type:{type:String,default:"default"},renderType:{type:String,default:"default"}},emits:["saveVoiceSuccess","showSubscribeDialog"],setup(o,{emit:i}){var r,d,p,v,m;const w=F(),x=E(),{createRenderType:C,vocalCornerMarkVisible:S}=y(w);null==(v=null==(p=null==(d=(_()||(null==(r=null==window?void 0:window.$getVueCurrentInstance)?void 0:r.call(window))).appContext)?void 0:d.config)?void 0:p.globalProperties)||v.$router,s();const{$$language:A,$$t:I,$$tm:L,$$tValue:P}=(null==(m=_().appContext)?void 0:m.config.globalProperties.$i18n)??{},M=o,V=i,D=c({cloneVoiceDialogVisible:!1}),$=k(()=>{var e,t,o,i;return!(null==(t=null==(e=x.userInfo)?void 0:e.user)?void 0:t.is_vip)||"basic"==(null==(i=null==(o=x.userInfo)?void 0:o.user)?void 0:i.vip_level_name)}),R=()=>{V("showSubscribeDialog","reference",{membership_source1:"tts",membership_source2:"tts_clone_voice"})},U=()=>{var e;D.cloneVoiceDialogVisible=!0;
1(_()||(null==(e=null==window?void 0:window.$getVueCurrentInstance)?void 0:e.call(window))).appContext.config.globalProperties.logCustomEvent("clone_voice_click",{source:"index"==M.renderType?"from_voice_library":"from_text_to_speech"})},O=e=>{V("saveVoiceSuccess",e)};return u(()=>{}),(o,i)=>(t(),e("div",{class:n(["add-tts-voice-file-container",{"add-tts-voice-file-container--renderdialog":"renderDialog"==M.type,[`add-tts-voice-file-container--${f(C)}`]:!0,"add-tts-voice-file-cn":f(se).appname==f(de)}])},[a("div",{class:"add-tts-voice-file-main",onClick:U},[f(S)?(t(),e("div",mo,[a("span",fo,l(f(I)("common.new")),1)])):b("",!0),a("div",{class:n(["add-tts-voice-file pointer",{[`add-tts-voice-file--${f(C)}`]:!0}])},[g(f(B),{name:"biz-voice-upload-track",size:"renderDialog"==M.type?32:20,opacity:"renderDialog"==M.type?1:.7,color:"renderDialog"==M.type?"#48E1EB":"#000"},null,8,["size","opacity","color"]),a("div",ho,[a("div",bo,["index"==M.renderType?(t(),e("span",yo,l(f(I)("tts.voice_clone")),1)):(t(),e("span",_o,l(f(I)("tts.clone_to_voice")),1)),$.value?(t(),h(re,{key:2,type:"pro",text:f(I)("create.pro_plan")},null,8,["text"])):b("",!0)]),a("div",wo,l(f(I)("tts.clone_to_voice_desc")),1)])],2)]),$.value?(t(),e("div",{key:0,class:"add-music-reference-edit-mask pointer",onClick:i[0]||(i[0]=T(e=>{R()},["stop"]))})):b("",!0),D.cloneVoiceDialogVisible?(t(),h(vo,{key:1,visible:D.cloneVoiceDialogVisible,"onUpdate:visible":i[1]||(i[1]=e=>D.cloneVoiceDialogVisible=e),"render-type":M.renderType,onSaveVoiceSuccess:O,onShowSubscribeDialog:R},null,8,["visible","render-type"])):b("",!0)],2))}},ko={class:"design-voice-prompt-label flex"},Co={class:"design-voice-prompt-label-text"},So={class:"design-voice-prompt-random-btn"},To={class:"block"},Ao=["placeholder","readonly","value"],Io={class:"design-voice-prompt-edit-count flex"},Lo={class:"design-voice-prompt-label design-voice-prompt-label2 flex"},Po={class:"design-voice-prompt-label-text"},Mo={class:"design-voice-prompt-random-btn"},Vo={class:"block"},Do={class:"design-voice-prompt-edit design-voice-prompt-edit2 flex"},$o=["placeholder","value"],Ro={class:"design-voice-prompt-done-btn-box"},Eo={class:"design-voice-prompt-done-btn"},Fo={key:0},Uo={key:1},Bo={key:2},Oo={key:0,class:"design-voice-prompt-result"},zo={__name:"addPromptDialog",props:{renderType:{type:String,default:""},prompt:{type:String,default:""},visible:{type:Boolean,default:!0}},emits:["update:visible","done"],setup(o,{emit:i}){var r,s,p,m,k,C,S,I;const L=F(),{createRenderType:P}=y(L),M=E(),V=W(),D=Q();null==(p=null==(s=(_()||(null==(r=null==window?void 0:window.$getVueCurrentInstance)?void 0:r.call(window))).appContext)?void 0:s.config)||p.globalProperties;const{$$language:$,$$t:R,$$tm:O,$$tValue:z}=(null==(m=_().appContext)?void 0:m.config.globalProperties.$i18n)??{};null==(I=null==(S=null==(C=(_()||(null==(k=null==window?void 0:window.$getVueCurrentInstance)?void 0:k.call(window))).appContext)?void 0:C.config)?void 0:S.globalProperties)||I.$router;const N=o,Y=i,G=d(null),K=d(null),X=d(null),J=c({visible:N.visible,prompt:N.prompt,lastSendPrompt:"",previewPrompt:"",isLoading:!1,isDisabledSend:!1,isSendLoading:!1,isPreviewLoading:!1,voiceInfo:null}),Z=e=>{var t;null==(t=G.value)||t.focus()},ee=()=>{J.inputing=!0},te=e=>{J.inputing=!1,ie(e)},oe=()=>{var e,t,o;(null==(e=J.voiceInfo)?void 0:e.mp3_url)||(2==(null==(t=J.voiceInfo)?void 0:t.machine_audit_state)?H.info({position:"top",content:R("create.song_state_auditing")}):4==(null==(o=J.voiceInfo)?void 0:o.machine_audit_state)&&H.info({position:"top",content:R("tts.audio_state_auditing_failed_disabled")}))},ie=e=>{J.inputing||(e.target.value.length>500&&(e.target.value=e.target.value.slice(0,500)),J.prompt=e.target.value,J.isDisabledSend=J.lastSendPrompt==J.prompt,Y("update:prompt",J.prompt))},ne=e=>{Y("update:prompt",J.prompt),J.isDisabledSend=J.lastSendPrompt==J.prompt},ae=()=>new Promise((e,t)=>{J.isLoading=!0,j.getRandomPrompt({generate_type:1}).then(e=>{200==e.code?(J.prompt=e.data.text,J.isDisabledSend=J.lastSendPrompt==J.prompt):6315!=e.code&&6316!=e.code||H.error({position:"top",content:"当前输入内容违反政策,请修改后重试"})}).catch(e=>{}).finally(()=>{J.isLoading=!1})}),le=()=>new Promise((e,t)=>
1{J.isSendLoading=!0,J.lastSendPrompt=J.prompt,j.getRandomPrompt({generate_type:2,prompt:J.prompt}).then(o=>{var i;M.refreshUserAccount(!0),200==o.code?(J.previewPrompt=o.data.text,J.isDisabledSend=J.lastSendPrompt==J.prompt,J.voiceInfo=o.data.voice??{title:"voice",prompt:J.lastSendPrompt,content:J.previewPrompt,...o.data},J.voiceInfo&&!(null==(i=J.voiceInfo)?void 0:i.mp3_url)&&ue(J.voiceInfo.id),e()):[6335,6303,6310].includes(o.code)?V.goCredits(o.code,{membership_source1:"tts",membership_source2:"tts_design_voice"}):6315==o.code||6316==o.code?(H.error({position:"top",content:"当前输入内容违反政策,请修改后重试"}),t(new Error("Content violates policy"))):t(new Error(`TTS request failed with code: ${o.code}`))}).catch(e=>{t(e||new Error("TTS request failed"))}).finally(()=>{J.isSendLoading=!1})}),re={},ue=e=>{var t;null==(t=re.registPollingCall)||t.call(re),e&&se.appname==de&&(re.lastPollingCallId=e,re.registPollingCall=ce.registPolling(()=>{var t;(t={id:e,type:1},new Promise((e,o)=>{j.getTtsVoiceStatus(t).then(o=>{J.voiceInfo.id==t.id&&(J.voiceInfo={...J.voiceInfo,...o.data}),e(o.data)}).catch(e=>{o(e)})})).then(e=>{var t,o,i;J.voiceInfo.id==re.lastPollingCallId&&((null==(t=J.voiceInfo)?void 0:t.mp3_url)||[1,3,4].includes(null==(o=J.voiceInfo)?void 0:o.machine_audit_state))&&(null==(i=re.registPollingCall)||i.call(re))})},5e3,!1))},pe=()=>new Promise((e,t)=>{J.isPreviewLoading=!0;const o=J.prompt;j.getRandomPrompt({generate_type:2,prompt:J.prompt}).then(i=>{var n;M.refreshUserAccount(!0),200==i.code?(J.previewPrompt=i.data.text,J.voiceInfo=i.data.voice??{title:"voice",prompt:o,content:J.previewPrompt,...i.data},J.voiceInfo&&!(null==(n=J.voiceInfo)?void 0:n.mp3_url)&&ue(J.voiceInfo.id),e()):[6335,6303,6310].includes(i.code)?V.goCredits(i.code,{membership_source1:"tts",membership_source2:"tts_design_voice"}):6315==i.code||6316==i.code?(H.error({position:"top",content:"当前输入内容违反政策,请修改后重试"}),t(new Error("Content violates policy"))):t(new Error(`TTS preview failed with code: ${i.code}`))}).catch(e=>{t(e||new Error("TTS preview failed"))}).finally(()=>{J.isPreviewLoading=!1})}),ge=(e,t)=>{var o;(_()||(null==(o=null==window?void 0:window.$getVueCurrentInstance)?void 0:o.call(window))).appContext.config.globalProperties.logCustomEvent(e,{...t})},ve=()=>{J.visible=!1},me=()=>{ge("design_voice_generate_click",{source:"index"==N.renderType?"from_voice_library":"from_text_to_speech",content:J.prompt});const e=(new Date).getTime();return new Promise((t,o)=>{J.isGenerateLoading=!0;const i={mode:1,prompt:J.prompt,content:J.previewPrompt};j.generateTtsVoice(i).then(t=>{var o,n,a,l;M.refreshUserAccount(!0),200==t.code?(J.voiceInfo={title:"voice",prompt:i.prompt,content:i.content,...t.data},J.voiceInfo&&!(null==(o=J.voiceInfo)?void 0:o.mp3_url)&&ue(J.voiceInfo.id)):[6335,6303,6310].includes(t.code)?V.goCredits(t.code,{membership_source1:"tts",membership_source2:"tts_design_voice"}):6108==t.code?H.error({position:"top",content:R("tts.generate_description_audit_failed")}):6315==t.code?H.error({position:"top",content:"当前输入音频违反政策,请修改后重试"}):6316==t.code?H.error({position:"top",content:"当前输入内容违反政策,请修改后重试"}):H.error({position:"top",content:R("tts.voice_generate_failed")}),ge("design_voice_generate_result",{source:"index"==N.renderType?"from_voice_library":"from_text_to_speech",content:J.prompt,result:200==t.code?1:0,duration:(((null==(n=t.data)?void 0:n.duration_milliseconds)??0)/1e3).toFixed(2),stay_time:(((new Date).getTime()-e)/1e3).toFixed(2),generate_time:(((null==(a=t.data)?void 0:a.finished_at)??0)-((null==(l=t.data)?void 0:l.created_at)??0)).toFixed(2)})}).catch(t=>{H.error({position:"top",content:R("tts.voice_generate_failed")}),ge("design_voice_generate_result",{source:"index"==N.renderType?"from_voice_library":"from_text_to_speech",content:J.prompt,result:0,duration:"0",wait_duration:(((new Date).getTime()-e)/1e3).toFixed(2)})}).finally(()=>{J.isGenerateLoading=!1})})},fe=async()=>{var e;Y("done",J.voiceInfo),null==(e=X.value)||e.togglePlay(!1)},he=()=>{J.visible=!1};return w(()=>N.visible,e=>{var t;J.visible=N.visible,J.prompt=N.prompt,N.visible&&(null==(t=G.value)||t.focu
1s())}),w(()=>J.visible,e=>{Y("update:visible",e)}),u(()=>{var e,t;null==(e=G.value)||e.focus();(_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties.logCustomEvent("design_voice_show",{source:"index"==N.renderType?"from_voice_library":"from_text_to_speech"})}),A(()=>{var e;null==(e=re.registPollingCall)||e.call(re)}),(o,i)=>(t(),h(q,{width:"720px",height:"unset","title-align":"left",title:f(R)("tts.vioce_design"),visible:J.visible,"mobile-render-type":"drawerDialog",onClose:he},{default:v(()=>{var o,r;return[a("div",{class:n(["height-all design-voice-prompt flex-column",{"design-voice-prompt--mobile":"mobile"==f(P)}])},[a("div",ko,[a("label",Co,l(f(R)("tts.prompt")),1),a("div",So,[g(f(U),{type:"ghost",size:"small",disabled:J.isLoading||J.isPreviewLoading||J.isSendLoading,loading:J.isLoading,onClick:ae},{prefix:v(()=>[g(f(B),{name:"biz-lyrics-random",size:"16",color:"#fff"})]),default:v(()=>[a("span",To,l(f(R)("tts.randomize")),1)]),_:1},8,["disabled","loading"])])]),a("div",{class:"design-voice-prompt-edit flex",onClick:Z},[a("textarea",{ref_key:"refInput",ref:G,placeholder:f(R)("tts.prompt_placeholder"),class:"flex1 width-0",readonly:J.isLoading||J.isPreviewLoading||J.isSendLoading,value:J.prompt,onInput:ie,onChange:ne,onCompositionstart:ee,onCompositionend:te},null,40,Ao),a("div",Io,[a("span",null,l((null==(o=J.prompt)?void 0:o.length)??0)+"/ "+l(500),1),g(f(U),{"loading-color-class":"white",disabled:J.isPreviewLoading||J.isDisabledSend||!J.prompt,loading:J.isSendLoading,onClick:T(le,["stop"])},{default:v(()=>[...i[0]||(i[0]=[a("i",{class:"icon icon-send"},null,-1)])]),_:1},8,["disabled","loading"])])]),a("div",Lo,[a("label",Po,l(f(R)("tts.preview_text")),1),a("div",Mo,[g(f(U),{disabled:!J.isDisabledSend||!J.previewPrompt||J.isPreviewLoading||J.isSendLoading||!J.prompt,loading:J.isPreviewLoading,size:"small",type:"ghost",onClick:pe},{default:v(()=>[i[1]||(i[1]=a("i",{class:"block icon icon-random"},null,-1)),a("span",Vo,l(f(R)("tts.regenerate")),1)]),_:1},8,["disabled","loading"])])]),a("div",Do,[a("textarea",{ref_key:"refPreviewInput",ref:K,placeholder:f(R)("tts.preview_text_placeholder"),readonly:!0,class:"flex1 width-0",value:J.previewPrompt},null,8,$o)]),a("div",Ro,[a("div",Eo,[g(je,{"show-left-button":!1,loading:J.isGenerateLoading,disabled:J.isGenerateLoading||!J.prompt||!J.previewPrompt,"button-text":f(R)("tts.generate_voice"),onOnLeftButtonClick:ve,onOnClick:me},{text:v(()=>[f(D).free_tts_duration?(t(),e("label",Fo,l(f(R)("tts.free_speech_generation_time",{min:f(D).free_tts_duration})),1)):b("",!0),f(D).free_tts_duration?b("",!0):(t(),e("label",Uo,l(`${f(R)("create.credits_remaining")} `),1)),f(D).free_tts_duration?b("",!0):(t(),e("span",Bo,l(f(M).credits??0),1))]),_:1},8,["loading","disabled","button-text"])])]),(null==(r=J.voiceInfo)?void 0:r.id)?(t(),e("div",Oo,[g(Be,{ref_key:"refAudioBar",ref:X,"voice-info":J.voiceInfo,onTogglePlay:oe},{suffix:v(()=>[g(f(U),{size:"small",onClick:fe},{default:v(()=>[x(l(f(R)("create.confirm")),1)]),_:1})]),_:1},8,["voice-info"])])):b("",!0)],2)]}),_:1},8,["title","visible"]))}},qo={key:0,class:"add-tts-voice-new-corner-mark"},Ho={class:"block"},jo={class:"add-tts-voice-prompt-desc-box"},No={class:"add-tts-voice-prompt-title flex"},Wo={key:0,class:"block olh"},Yo={key:1,class:"block olh"},Go={class:"add-tts-voice-prompt-desc omlh-2"},Qo={__name:"addPrompt",props:{type:{type:String,default:"default"},renderType:{type:String,default:"default"}},emits:["saveVoiceSuccess"],setup(o,{emit:i}){var r,d,p,v,m;const w=F();E();const{createRenderType:x,vocalCornerMarkVisible:k}=y(w);null==(v=null==(p=null==(d=(_()||(null==(r=null==window?void 0:window.$getVueCurrentInstance)?void 0:r.call(window))).appContext)?void 0:d.config)?void 0:p.globalProperties)||v.$router,s();const{$$language:C,$$t:S,$$tm:T,$$tValue:A}=(null==(m=_().appContext)?void 0:m.config.globalProperties.$i18n)??{},I=o,L=i,P=c({addPromptDialogVisible:!1,file:null,editFilePopupVisible:!1,clipSourceData:null,editFileName:"",addPromptBasicInfoDialogVisible:!1}),M=()=>{var e;P.addPromptDialogVisible=!0;
1(_()||(null==(e=null==window?void 0:window.$getVueCurrentInstance)?void 0:e.call(window))).appContext.config.globalProperties.logCustomEvent("design_voice_click",{source:"index"==I.renderType?"from_voice_library":"from_text_to_speech"})},V=e=>{P.voiceInfo=e,P.addPromptBasicInfoDialogVisible=!0},D=e=>{L("saveVoiceSuccess",e,"prompt"),P.addPromptDialogVisible=!1,P.addPromptBasicInfoDialogVisible=!1},$=()=>{P.visible=!1};return u(()=>{}),(o,i)=>(t(),e("div",{class:n(["add-tts-voice-prompt-container",{"add-tts-voice-prompt-container--renderdialog":"renderDialog"==I.type,[`add-tts-voice-prompt-container--${f(x)}`]:!0,"add-tts-voice-prompt-cn":f(se).appname==f(de)}])},[a("div",{class:"add-tts-voice-prompt-main",onClick:M},[f(k)?(t(),e("div",qo,[a("span",Ho,l(f(S)("common.new")),1)])):b("",!0),a("div",{class:n(["add-tts-voice-prompt pointer",{[`add-tts-voice-prompt--${f(x)}`]:!0}])},[g(f(B),{name:"biz-nav-studio",size:"renderDialog"==I.type?32:20,opacity:"renderDialog"==I.type?1:.7,color:"renderDialog"==I.type?"#48E1EB":"#000"},null,8,["size","opacity","color"]),a("div",jo,[a("div",No,["index"==I.renderType?(t(),e("span",Wo,l(f(S)("tts.vioce_design")),1)):(t(),e("span",Yo,l(f(S)("tts.prompt_to_voice")),1))]),a("div",Go,l(f(S)("tts.prompt_to_voice_desc")),1)])],2)]),P.addPromptDialogVisible?(t(),h(zo,{key:0,visible:P.addPromptDialogVisible,"onUpdate:visible":i[0]||(i[0]=e=>P.addPromptDialogVisible=e),"render-type":I.renderType,onDone:V},null,8,["visible","render-type"])):b("",!0),P.addPromptBasicInfoDialogVisible?(t(),h(jt,{key:1,visible:P.addPromptBasicInfoDialogVisible,"onUpdate:visible":i[1]||(i[1]=e=>P.addPromptBasicInfoDialogVisible=e),"render-type":I.renderType,"voice-info":P.voiceInfo,type:"design",onSaveVoiceSuccess:D,onClose:$},null,8,["visible","render-type","voice-info"])):b("",!0)],2))}},Ko={key:0,class:"tts-voice-library-and-add-tab"},Xo={class:"tts-voice-library-and-add-tabs"},Jo=["onClick"],Zo={class:"block"},ei={key:1,class:"tts-voice-library-and-add-search"},ti={__name:"addReferVoiceTabSearch",props:{renderType:{type:String,default:"dialog"},activeTabCode:{type:String,default:"1"},activeTab2Code:{type:String,default:"1_1"},filterValue:{type:String,default:""},isShowSearch:{type:Boolean,default:!1},arrowActive:{type:Boolean,default:!1}},emits:["onTabClick","update:isShowSearch","onSearch","update:activeTabCode"],setup(d,{emit:p}){var m;const h=F(),y=E();r(),s();const{$$language:k,$$t:S,$$tm:A,$$tValue:I}=(null==(m=_().appContext)?void 0:m.config.globalProperties.$i18n)??{},L=d,P=p,M=()=>["index"==L.renderType?{label:"1_1"==L.activeTab2Code?S("create.all"):S("tts.trending_voices"),value:"1"}:{label:S("tts.explore"),value:"1"},{label:S("tts.my_voice"),value:"3"},{label:S("create.liked"),value:"4"}].concat("index"!=L.renderType?[{label:S("create.used"),value:"2"}]:[]),V=c({tabIndex:L.activeTabCode,activeTabValue:{label:S("create.all"),value:1},filterValue:L.filterValue||"",tabSelectOptions:M()}),D=()=>{P("update:isShowSearch",!L.isShowSearch)},$=e=>{V.filterValue=e},R=()=>{P("onSearch",V.filterValue)},U=()=>{V.filterValue="",P("onSearch",V.filterValue)};return w(()=>L.activeTabCode,()=>{V.tabIndex=L.activeTabCode}),w(()=>V.tabIndex,()=>{P("update:activeTabCode",V.tabIndex)}),w(()=>y.appLanguage,()=>{C().then(()=>{V.tabSelectOptions=M()})}),u(()=>{}),w(()=>L.activeTab2Code,()=>{V.tabSelectOptions=M()}),(r,s)=>(t(),e("div",{class:n(["tts-voice-library-and-add-tab-search",{"tts-voice-library-and-add-tab-search-index":"index"==L.renderType,[`tts-voice-library-and-add-tab-search-${f(h).createRenderType}`]:!0}])},[L.isShowSearch?b("",!0):(t(),e("div",Ko,[a("div",Xo,[(t(!0),e(o,null,i(V.tabSelectOptions,o=>(t(),e("div",{key:o.value,class:n(["tts-voice-library-and-add-tab-item flex pointer",{active:V.tabIndex==o.value}]),onClick:T(()=>{var e;e=o.value,V.tabIndex=e,P("onTabClick",e)},["stop"])},[a("span",Zo,l(o.label),1),"index"==L.renderType&&1==o.value?(t(),e("i",{key:0,class:n(["block",{"i-active":L.arrowActive}])},null,2)):b("",!0)],10,Jo))),128))]),"dialog"==L.renderType?(t(),e("div",{key:0,class:"tts-voice-library-and-add-search-mini flex-center pointer",onClick:D},[...s[3]||(s[3]=[a("i",{class:"block icon-search"},null,-1)])])):b("",!0)])),L.isShowSearch&&"dialog"==L.renderType?(t(),e("div",ei,[g(be,{ref:"refSearchInput",modelValue:V.filterValue,"onUpdate:modelValue":s[0]||(s[0]=e=>V.filterValue=e),"render-style":{"--height":"100%","--padding":"0 1px 0 9px","--borderRadius":"60px","--border":"solid 1px transparent","--focusBorder":"1px solid #48e1eb","--background":"rgba(255,255,255,0.1)","--backgroundHover":"rgba(255,255,255,0.125)","--backgroundFocus":"rgba(255, 255, 255, 0.1)","--fontSize":"14px","--fontColor":"#fff","--fontFamily":"inherit","--fontWeight":"400","--lineHeight":"24px"},clearable:!1,placeholder:f(S)("create.enter_song_title_search"),onInput:$,onKeyupEnter:R,onClear:U},{suffix:v(()=>[g(K,{"render-style":{"--padding":"0 12px","--width":"max-content","--height":"36px","--borderRadius":"50px","--background":"linear-gradient(120deg, rgb(72, 225, 235, 1) -1%, rgb(72, 225, 235, 1) 100%)","--backgroundHover":"linear-gradient(120deg, rgb(72, 225, 235, 0.75) -1%, rgb(72, 225, 235, 0.75) 100%)","--fontColor":"#000","--fontColorHover":"#000","--fontSize":"12px","--fontWeight":"normal","--border":"none"},onClick:R},{default:v(()=>[x(l(f(S)("create.search")),1)]),_:1})]),_:1},8,["modelValue","placeholder"]),"dialog"==L.renderType?(t(),e("div",{key:0,class:"tts-voice-library-and-add-close-mini flex-center pointer",onClick:D},[...s[4]||(s[4]=[a("i",{class:"block icon-close"},null,-1)])])):b("",!0),b("",!0)])):b("",!0)],2))}},oi={class:"edit-voice-song-info-item-name"},ii={key:0,class:"edit-voice-song-info-item-error fn-inline"},ni={class:"edit-voice-song-info-title flex"},ai=["placeholder","value"],li={class:"edit-voice-song-info-title-count"},ri={class:"edit-voice-song-info-item-name"},si={key:0,class:"edit-voice-song-info-item-error fn-inline"},di={class:"edit-voice-song-info-content"},ci={class:"edit-voice-song-info-item-name"},ui={key:0,class:"edit-voice-song-info-item-error fn-inline"},pi={class:"edit-voice-song-info-description flex"},gi=["placeholder","value"],vi={class:"edit-voice-song-info-description-count"},mi={class:"edit-voice-song-info-done-btn-box"},fi={class:"edit-voice-song-info-done-btn"},hi={__name:"editVoiceBasicInfo",props:{renderType:{type:String,default:""},item:{type:Object,default:null},visible:{type:Boolean,default:!0}},emits:["update:visible","done","complete"],setup(o,{emit:i}){var r,s,p,m,k,C,S,T,A,I;const L=F(),{createRenderType:P}=y(L);null==(p=null==(s=(_()||(null==(r=null==window?void 0:window.$getVueCurrentInstance)?void 0:r.call(window))).appContext)?void 0:s.config)||p.globalProperties;
1const{$$language:M,$$t:V,$$tm:D,$$tValue:R}=(null==(m=_().appContext)?void 0:m.config.globalProperties.$i18n)??{};null==(T=null==(S=null==(C=(_()||(null==(k=null==window?void 0:window.$getVueCurrentInstance)?void 0:k.call(window))).appContext)?void 0:C.config)?void 0:S.globalProperties)||T.$router;const E=o,B=i,O=d(null),z={filenameRule:[e=>!!e||V("create.this_field_is_required"),e=>!/^(\s+)|(\n+)$/.test(e)||V("create.this_field_is_required"),e=>e.length>=1&&e.length<=50||R("create.song_name_max_characters",{num:50})]};d(null);const H=c({item:E.item,imageData:{},uploadCallbackData:null,singerRadioSlectedState:!1,visible:E.visible,filename:null==(A=E.item)?void 0:A.title,description:null==(I=E.item)?void 0:I.description}),j=c({validataFilename:"",validataSongCover:"",validataDescription:""}),N=()=>{H.inputing=!0},W=e=>{H.inputing=!1,Y(e)},Y=e=>{H.inputing||(e.target.value.length>50&&(e.target.value=e.target.value.slice(0,50)),H.filename=e.target.value,Z.validataFilename(H.filename))},G=e=>{Z.validataFilename(H.filename)},Q=()=>{H.inputingTextarea=!0},K=e=>{H.inputingTextarea=!1,X(e)},X=e=>{H.inputingTextarea||(e.target.value.length>500&&(e.target.value=e.target.value.slice(0,500)),H.description=e.target.value,B("update:description",H.description),Z.validataDescription(H.description))},J=e=>{B("update:description",H.description),Z.validataDescription(H.description)},Z={validataFilename:e=>{let t=z.filenameRule.findIndex(t=>1!=t(e));return t>=0?(j.validataFilename=z.filenameRule[t](e),!1):(j.validataFilename="",!0)},validataDescription:e=>e.length?(j.validataDescription="",!0):(j.validataDescription=V("create.this_field_is_required"),!1)},ee=e=>{j.validataSongCover=e?"":V("create.this_field_is_required")},te=async()=>{var e,t,o;let i=await Z.validataFilename(H.filename),n=await Z.validataDescription(H.description);try{if(H.imageData=await(null==(e=O.value)?void 0:e.getClipImageData()),!(null==(t=H.imageData)?void 0:t.file))return void(j.validataSongCover=V("create.this_field_is_required"));j.validataSongCover=""}catch(a){return void(j.validataSongCover=V("create.this_field_is_required"))}i&&n&&B("complete",H.item,H.imageData,{id:null==(o=H.item)?void 0:o.id,title:H.filename,description:H.description},()=>{H.filename="",B("update:visible",!1)})},oe=()=>{H.visible=!1};return w(()=>E.visible,e=>{var t;H.visible=E.visible,H.filename=null==(t=H.item)?void 0:t.title}),w(()=>H.visible,e=>{B("update:visible",e)}),u(()=>{}),(o,i)=>(t(),h(q,{width:"720px",height:"unset","title-align":"left",title:f(V)("tts.edit_voice_info"),visible:H.visible,"mobile-render-type":"drawerDialog",onClose:oe},{default:v(()=>{var o,i,r,s,d;return[a("div",{class:n(["height-all edit-voice-song-info flex-column",{"edit-voice-song-info--mobile":"mobile"==f(P)}])},[a("div",oi,[x(l(f(V)("editor.title"))+" ",1),j.validataFilename?(t(),e("span",ii," ( "+l(j.validataFilename)+" ) ",1)):b("",!0)]),a("div",ni,[a("input",{placeholder:f(V)("editor.title"),class:"flex1 width-0",value:H.filename,onInput:Y,onChange:G,onCompositionstart:N,onCompositionend:W},null,40,ai),a("div",li,l((null==(o=H.filename)?void 0:o.length)??0)+"/ "+l(50),1)]),a("div",ri,[x(l(f(V)("create.cover"))+" ",1),j.validataSongCover?(t(),e("span",si," ( "+l(j.validataSongCover)+" ) ",1)):b("",!0)]),a("div",di,[g(ye,{ref_key:"refUploadClipImage",ref:O,"img-url":(null==(i=H.item)?void 0:i.cover)?f($)(null==(r=H.item)?void 0:r.cover):"","path-key":null==(s=H.item)?void 0:s.cover,"image-explain":f(V)("create.song_publish_image_explain"),"allow-replace-by-preview-click":!0,onUrlChange:ee},null,8,["img-url","path-key","image-explain"])]),a("div",ci,[x(l(f(V)("tts.description"))+" ",1),j.validataDescription?(t(),e("span",ui," ( "+l(j.validataDescription)+" ) ",1)):b("",!0)]),a("div",pi,[a("textarea",{ref:"refPreviewInput",placeholder:f(V)("tts.prompt_placeholder"),class:"flex1 width-0",value:H.description,onCompositionstart:Q,onCompositionend:K,onInput:X,onChange:J},null,40,gi),a("div",vi,l((null==(d=H.description)?void 0:d.length)??0)+"/ "+l(500),1)]),a("div",mi,[a("div",fi,[g(f(U),{onClick:te},{default:v(()=>[x(l(f(V)("create.done")),1)]),_:1})])])],2)]}),_:1},8,["title","visible"]))}},bi={class:"voice-song-go-to-publish-item-name"},yi={key:0,class:"voice-song-go-to-publish-item-error fn-inline"},_i={class:"voice-song-go-to-publish-title flex"},wi=["placeholder","value"],xi={class:"voice-song-go-to-publish-title-count"},ki={class:"voice-song-go-to-publish-item-name"},Ci={key:0,class:"voice-song-go-to-publish-item-error fn-inline"},Si={class:"voice-song-go-to-publish-content"},Ti={class:"voice-song-go-to-publish-item-name"},Ai={key:0,class:"voice-song-go-to-publish-item-error fn-inline"},Ii={class:"voice-song-go-to-publish-description flex"},Li=["placeholder","value"],Pi={class:"voice-song-go-to-publish-description-count"},Mi={class:"voice-song-go-to-publish-done-btn-box"},Vi={class:"voice-song-go-to-publish-done-btn"},Di={__name:"goToPublish",props:{renderType:{type:String,default:""},item:{type:Object,default:null},visible:{type:Boolean,default:!0}},emits:["update:visible","done","complete"],setup(o,{emit:i}){var r,s,p,m,k,S,T,A,I,L;const P=F(),{createRenderType:M}=y(P);null==(p=null==(s=(_()||(null==(r=null==window?void 0:window.$getVueCurrentInstance)?void 0:r.call(window))).appContext)?void 0:s.config)||p.globalProperties;const{$$language:V,$$t:D,$$tm:R,$$tValue:E}=(null==(m=_().appContext)?void 0:m.config.globalProperties.$i18n)??{};null==(A=null==(T=null==(S=(_()||(null==(k=null==window?void 0:window.$getVueCurrentInstance)?void 0:k.call(window))).appContext)?void 0:S.config)?void 0:T.globalProperties)||A.$router;const B=o,O=i,z=d(null),H=d(null),j={filenameRule:[e=>!!e||D("create.this_field_is_required"),e=>e.length>=1&&e.length<=50||E("create.song_name_max_characters",{num:50})]};d(null);const N=c({item:B.item,imageData:{},uploadCallbackData:null,singerRadioSlectedState:!1,visible:B.visible,filename:null==(I=B.item)?void 0:I.title,de
1scription:null==(L=B.item)?void 0:L.description}),W=c({validataFilename:"",validataSongCover:"",validataDescription:""}),Y=()=>{N.inputing=!0},G=e=>{N.inputing=!1,Q(e)},Q=e=>{N.inputing||(e.target.value.length>50&&(e.target.value=e.target.value.slice(0,50)),N.filename=e.target.value,te.validataFilename(N.filename))},K=e=>{te.validataFilename(N.filename)},X=()=>{N.inputingTextarea=!0},J=e=>{N.inputingTextarea=!1,Z(e)},Z=e=>{N.inputingTextarea||(e.target.value.length>500&&(e.target.value=e.target.value.slice(0,500)),N.description=e.target.value,O("update:description",N.description),te.validataDescription(N.description))},ee=e=>{O("update:description",N.description),te.validataDescription(N.description)},te={validataFilename:e=>{let t=j.filenameRule.findIndex(t=>1!=t(e));return t>=0?(W.validataFilename=j.filenameRule[t](e),!1):(W.validataFilename="",!0)},validataDescription:e=>e.length?(W.validataDescription="",!0):(W.validataDescription=D("create.this_field_is_required"),!1)},oe=e=>{W.validataSongCover=e?"":D("create.this_field_is_required")},ie=async()=>{var e,t,o;let i=await te.validataFilename(N.filename),n=await te.validataDescription(N.description);try{if(N.imageData=await(null==(e=z.value)?void 0:e.getClipImageData()),!(null==(t=N.imageData)?void 0:t.file))return W.validataSongCover=D("create.this_field_is_required"),void C().then(()=>{var e,t;null==(t=null==(e=H.value)?void 0:e.querySelector(".voice-song-go-to-publish-item-error"))||t.scrollIntoView()});W.validataSongCover=""}catch(a){return W.validataSongCover=D("create.this_field_is_required"),void C().then(()=>{var e,t;null==(t=null==(e=H.value)?void 0:e.querySelector(".voice-song-go-to-publish-item-error"))||t.scrollIntoView()})}i&&n?O("complete",N.item,N.imageData,{id:null==(o=N.item)?void 0:o.id,title:N.filename,description:N.description},()=>{O("update:visible",!1)}):C().then(()=>{var e,t;null==(t=null==(e=H.value)?void 0:e.querySelector(".voice-song-go-to-publish-item-error"))||t.scrollIntoView()})},ne=()=>{N.visible=!1};return w(()=>B.visible,e=>{var t;N.visible=B.visible,N.filename=null==(t=B.item)?void 0:t.title}),w(()=>N.visible,e=>{O("update:visible",e)}),u(()=>{}),(o,i)=>(t(),h(q,{width:"720px",height:"unset","title-align":"left",title:f(D)("create.song_apply_to_publish"),"sub-title":f(D)("tts.publish_subtitle"),visible:N.visible,"mobile-render-type":"drawerDialog",onClose:ne},{default:v(()=>{var o,i,r,s,d;return[a("div",{ref_key:"refGoToPublish",ref:H,class:n(["height-all voice-song-go-to-publish flex-column",{"voice-song-go-to-publish--mobile":"mobile"==f(M)}])},[a("div",bi,[x(l(f(D)("editor.title"))+" ",1),W.validataFilename?(t(),e("span",yi," ( "+l(W.validataFilename)+" ) ",1)):b("",!0)]),a("div",_i,[a("input",{placeholder:f(D)("editor.title"),class:"flex1 width-0",value:N.filename,onInput:Q,onChange:K,onCompositionstart:Y,onCompositionend:G},null,40,wi),a("div",xi,l((null==(o=N.filename)?void 0:o.length)??0)+"/ "+l(50),1)]),a("div",ki,[x(l(f(D)("create.cover"))+" ",1),W.validataSongCover?(t(),e("span",Ci," ( "+l(W.validataSongCover)+" ) ",1)):b("",!0)]),a("div",Si,[g(ye,{ref_key:"refUploadClipImage",ref:z,"img-url":(null==(i=N.item)?void 0:i.cover)?f($)(null==(r=N.item)?void 0:r.cover):"","path-key":null==(s=N.item)?void 0:s.cover,"image-explain":f(D)("create.song_publish_image_explain"),"allow-replace-by-preview-click":!0,onUrlChange:oe},null,8,["img-url","path-key","image-explain"])]),a("div",Ti,[x(l(f(D)("tts.description"))+" ",1),W.validataDescription?(t(),e("span",Ai," ( "+l(W.validataDescription)+" ) ",1)):b("",!0)]),a("div",Ii,[a("textarea",{ref:"refPreviewInput",placeholder:f(D)("tts.prompt_placeholder"),class:"flex1 width-0",value:N.description,onCompositionstart:X,onCompositionend:J,onInput:Z,onChange:ee},null,40,Li),a("div",Pi,l((null==(d=N.description)?void 0:d.length)??0)+"/ "+l(500),1)]),a("div",Mi,[a("div",Vi,[g(f(U),{onClick:ie},{default:v(()=>[x(l(f(D)("create.publish")),1)]),_:1})])])],2)]}),_:1},8,["title","sub-title","visible"]))}},$i={class:"fn-inline olh"},Ri={class:"fn-inline olh"},Ei={class:"fn-inline olh"},Fi={__name:"voiceItemReferOpDialog",props:{renderType:{type:String,default:""},visible:{type:Boolean,default:!1},item:{type:Object,default:()=>({})}},emits:["update:visible","report","delete","editInfo","publish","cancelPublish"],setup(o,{emit:i}){var r,s,d,p,g;E();const m=F(),{createRenderType:x}=y(m);null==(p=null==(d=null==(s=(_()||(null==(r=null==window?void 0:window.$getVueCurrentInstance)?void 0:r.call(window))).appContext)?void 0:s.config)?void 0:d.globalProperties)||p.$router;const{$$language:k,$$t:C,$$tm:S,$$tValue:T}=(null==(g=_().appContext)?void 0:g.config.globalProperties.$i18n)??{},A=o,I=i,L=c({item:A.item,visible:A.visible}),P=()=>{I("delete",L.item)},M=()=>{I("editInfo",L.item)},V=()=>{L.visible=!1};return w(()=>A.visible,e=>{L.visible=A.visible}),w(()=>L.visible,e=>{I("update:visible",e)}),u(()=>{}),(o,i)=>{const r=q;return t(),h(r,{titleAlign:"left",title:f(C)("create.more"),visible:L.visible,onClose:V,customClass:"audio-refer-item-op-items-dialog",mobileRenderType:"drawerDialog"},{default:v(()=>[a("div",{class:n(["audio-refer-item-op-items-dialog-content",`audio-refer-item-op-items-dialog-content--${A.listRenderType}`])},[a("div",{class:"audio-refer-item-op-item audio-refer-item-op-item-report",onClick:i[0]||(i[0]=()=>{var e;1==(null==(e=L.item)?void 0:e.is_published)?I("cancelPublish",L.item):I("publish",L.item)})},[i[1]||(i[1]=a("i",{class:"fn-inline"},null,-1)),a("span",$i,l(L.item.public_at>0?f(C)("create.published"):f(C)("create.publish")),1)]),!L.item.public_at>0?(t(),e("div",{key:0,class:"audio-refer-item-op-item",onClick:M},[i[2]||(i[2]=a("i",{class:"fn-inline"},null,-1)),a("span",Ri,l(f(C)("tts.edit_voice_info")),1)])):b("",!0),a("div",{class:"audio-refer-item-op-item",onClick:P},[i[3]||(i[3]=a("i",{class:"fn-inline"},null,-1)),a("span",Ei,l(f(C)("create.delete")),1)])],2)]),_:1},8,["title","visible"])}}},Ui=["data-tts-voice-id"],Bi={class:"audio-item-tts-voice-op-box fn-inline pointer"},Oi={class:"audio-item-tts-voice-info flex1 width-0"},zi={class:"audio-item-tts-voice-title-tag flex"},qi={class:"audio-item-tts-voice-title olh"},Hi={class:"audio-item-tts-voice-decription olh"},ji={class:"audio-item-country-flag"},Ni={class:"audio-item-btn-group flex"},Wi={class:"audio-item-btn audio-item-tts-voice-btn1"},Yi={key:1,class:"audio-item-tts-voice-more-box pointer flex-center"},Gi={class:"audio-item-tts-voice-more-list-box"},Qi={class:"audio-item-tts-voice-more-list"},Ki={__name:"referenceItem",props:{renderType:{type:String,default:""},hideFrom:{type:Boolean,default:!1},isUsed:{type:Boolean,default:!1},item:{type:Object,default:()=>{}},index:{type:Number,default:0},tabCode:{type:[Number,String],default:""}},emits:["apply","cancel","more","delete","publish","cancelPublish","report","editInfo","like","unlike"],setup(o,{emit:i}){var r,p,k,S,I,L,P;const M=F(),{createRenderType:V}=y(M),D=E(),R=W();null==(S=null==(k=null==(p=(_()||(null==(r=null==window?void 0:window.$getVueCurrentInstance)?void 0:r.call(window))).appContext)?void 0:p.config)?void 0:k.globalProperties)||S.$router,s();const{$$language:B,$$t:z,$$tm:q,$$tValue:Y}=(null==(I=_().appContext)?void 0:I.config.globalProperties.$i18n)??{},G=(_()||(null==(L=null==window?void 0:window.$getVueCurrentInstance)?void 0:L.call(window))).appContext,Q=o,K=d(null);d(null);const J=d(null);d(null);const Z=i,ee=c({isRenderMore:!0,item:Q.item,isCurPlay:!1,curUseReferMusic:null,duration:((null==(P=Q.item)?void 0:P.duration_milliseconds)??0)/1e3,isplay:!1,buffer:!1,progress:0,isEditTitle:!1,position:"bottom",moreDialogVisible:!1,goToPublishDialog:!1,editSongInfoDialogVisible:!1}),te=e=>{ee.duration=e},oe=e=>{var t,o,i,n,a,l;ee.isplay=e,ee.isplay&&ae("voice_play_click",{source:"index"==Q.renderType?"from_voice_library":"from_text_to_speech",content_id:null==(t=ee.item.id)?void 0:t.toString(),song_url:null==(o=ee.item)?void 0:o.mp3_url,duration:null==(i=ee.duration)?void 0:i.toString(),is_self:(null==(n=ee.item)?void 0:n.user_id
1)==(null==(l=null==(a=D.userInfo)?void 0:a.user)?void 0:l.user_id)?1:0})},ie=e=>{ee.buffer=e},ne=e=>{ee.progress=e},ae=(e,t)=>{var o;(_()||(null==(o=null==window?void 0:window.$getVueCurrentInstance)?void 0:o.call(window))).appContext.config.globalProperties.logCustomEvent(e,{...t})},le=()=>{var e;if(null!=ee.item.machine_audit_state&&se.appname==de){if([2].includes(ee.item.machine_audit_state))return H.info({position:"top",content:z("create.song_state_auditing")}),void ge({id:ee.item.id},!1).then(e=>{});if([4].includes(ee.item.machine_audit_state))return void H.info({position:"top",content:z("tts.audio_state_auditing_failed_disabled")})}null==(e=J.value)||e.changeOp(),C().then(()=>{R.togglePlayMusic(ee.item,Q.tabCode)})},re=()=>{ee.isRenderMore=!1,C(()=>{ee.isRenderMore=!0})},ce=()=>{var e,t,o,i,n,a;ge({id:ee.item.id}).then(e=>{Z("apply",ee.item)}),ae("voice_apply",{source:"index"==Q.renderType?"from_voice_library":"from_text_to_speech",content_id:null==(e=ee.item.id)?void 0:e.toString(),song_url:null==(t=ee.item)?void 0:t.mp3_url,duration:null==(o=ee.duration)?void 0:o.toString(),is_self:(null==(i=ee.item)?void 0:i.user_id)==(null==(a=null==(n=D.userInfo)?void 0:n.user)?void 0:a.user_id)?1:0})},ue=()=>{ee.moreDialogVisible=!0},pe=()=>{re(),ee.moreDialogVisible=!1,ee.reportDialogVisible=!0},ge=(e,t=!0)=>new Promise((o,i)=>{if(se.appname!=de)return void o({id:e.id,machine_audit_state:1});let n;t&&(n=H.info({position:"center",content:z("create.get_song_state_loading")})),j.getTtsVoiceStatus({id:null==e?void 0:e.id,type:2}).then(a=>{null==n||n.clear(),200==a.code?([1,3].includes(a.data.machine_audit_state)?o(a.data):4==a.data.machine_audit_state?(t&&H.info({position:"top",content:z("create.song_state_auditing_failed")}),i(a.data)):2==a.data.machine_audit_state?t&&H.info({position:"top",content:z("create.song_state_auditing")}):(i(a.data),t&&H.info({position:"top",content:z("tts.get_voice_state_failed")})),ee.item={...ee.item,...a.data}):(i(a),t&&H.info({position:"top",content:z("tts.get_voice_state_failed")})),R.updateReferMusicInfo(e.id,{...a.data},Q.tabCode)}).catch(e=>{null==n||n.clear(),i(e),t&&H.info({position:"top",content:z("tts.get_voice_state_failed")})})}),ve=()=>{ge({id:ee.item.id}).then(e=>{re(),ee.moreDialogVisible=!1,ee.editSongInfoDialogVisible=!0})},me=()=>{ge({id:ee.item.id}).then(e=>{re(),ee.moreDialogVisible=!1,ee.goToPublishDialog=!0})},fe=()=>(re(),new Promise((e,t)=>{O({hideCancel:!1,content:z("create.action_unpblish"),confirmLabel:z("create.unpublish"),confirm:o=>{var i;o();let n=H.info({position:"center",content:z("create.applying")});j.publishTtsVoiceinfo({id:null==(i=ee.item)?void 0:i.id,is_published:2}).then(o=>{var i;n&&n.clear(),200==o.code?(Object.assign(ee.item,{public_at:0}),H.success({content:z("tts.voice_unpublish_success"),position:"top"}),R.updateReferMusicInfo(null==(i=ee.item)?void 0:i.id,{public_at:0}),R.removeReferItemFromList(ee.item,"all_all"),R.removeReferItemFromList(ee.item,"all_quality"),e()):(H.info({position:"top",content:z("tts.voice_unpublish_failed")}),t(err))}).catch(e=>{n&&n.clear(),H.error({content:z("tts.voice_unpublish_failed"),position:"top"}),t(e)})},cancel(e){e(),t("cancel")}})})),he=(e,t,o)=>{let i=H.info({position:"center",content:z("create.applying")});_e(t).then(e=>{null==i||i.clear(),j.editTtsVoiceInfo({cover:e.pathKey,...o}).then(t=>{var i;200==t.code?(H.success({content:z("create.save_success"),position:"top"}),Object.assign(ee.item,{cover:e.pathKey,title:o.title,description:o.description}),Z("editInfo",ee.item),ee.editSongInfoDialogVisible=!1,R.updateReferMusicInfo(null==(i=ee.item)?void 0:i.id,{cover:e.pathKey,title:o.title,description:o.description})):6316==t.code?H.error({content:"当前输入内容违反政策,请修改后重试",position:"top"}):6320==t.code?H.error({content:"当前音色封面违反政策,请修改后重试",position:"top"}):H.error({content:z("create.save_failed"),position:"top"})}).catch(e=>{H.error({content:z("create.save_failed"),position:"top"})})}).catch(e=>{null==i||i.clear(),H.error({content:z("create.save_failed"),position:"top"})})},be=(e,t,o)=>{let i=H.info({position:"center",content:z("create.applying")});_e(t).then(e=>{j.publishTtsVoiceinfo({is_published:1,cover:e.pathKey,...o}).then(t=>{var n,a,l,r,s,d,c;null==i||i.clear(),200==t.code?(H.success({content:z("tts.voice_publish_success"),position:"top"}
1),Object.assign(ee.item,{public_at:(new Date).getTime(),cover:e.pathKey,title:o.title,description:o.description}),ee.goToPublishDialog=!1,R.updateReferMusicInfo(null==(n=ee.item)?void 0:n.id,{public_at:(new Date).getTime(),cover:e.pathKey,title:o.title,description:o.description}),R.insertReferItemFromList(ee.item,"all_all"),ae("voice_publish_click",{source:"index"==Q.renderType?"from_voice_library":"from_text_to_speech",content_id:null==(a=ee.item.id)?void 0:a.toString(),song_url:null==(l=ee.item)?void 0:l.mp3_url,duration:null==(r=ee.duration)?void 0:r.toString(),is_self:(null==(s=ee.item)?void 0:s.user_id)==(null==(c=null==(d=D.userInfo)?void 0:d.user)?void 0:c.user_id)?1:0})):6316==t.code?H.error({position:"top",content:"当前输入内容违反政策,请修改后重试"}):6320==t.code?H.error({position:"top",content:"当前音色封面违反政策,请修改后重试"}):H.error({position:"top",content:z("tts.voice_publish_failed")})}).catch(e=>{null==i||i.clear(),H.error({position:"top",content:z("tts.voice_publish_failed")})})}).catch(e=>{null==i||i.clear(),H.error({position:"top",content:z("tts.voice_publish_failed")})})},ye=()=>{re(),O({content:z("tts.remove_voice_alert"),confirmLabel:z("create.confirm"),cancelLabel:z("create.cancel"),confirm:e=>{R.deleteReferItem(ee.item),e()},cancel(e){e()}})},_e=(e,t)=>new Promise(async(o,i)=>{if(e.changed||!e.pathKey)try{o(await N.uploadFileToObjectStorage(e.file,e=>{null==t||t(e)}))}catch(n){i(n)}else o({pathKey:e.pathKey,fullUrl:$(e.pathKey)})});w(()=>R.curUseReferMusic,()=>{ee.curUseReferMusic=R.curUseReferMusic}),w(()=>Q.item,()=>{ee.item=Q.item});const we=()=>{var e,t,o,i;ee.isCurPlay=(null==(i=null==(o=null==(t=null==(e=null==G?void 0:G.config)?void 0:e.globalProperties)?void 0:t.$globalMediaUtils)?void 0:o.globalAudioPlayer)?void 0:i.currentUrl)==`${$(ee.item.url)}${Q.audioUrlSuffix}&id=${ee.item.id}`};return u(()=>{var e,t,o,i,n;ee.duration=((null==(e=ee.item)?void 0:e.duration_milliseconds)||0)/1e3,null==(n=null==(i=null==(o=null==(t=null==G?void 0:G.config)?void 0:t.globalProperties)?void 0:o.$globalMediaUtils)?void 0:i.globalAudioPlayer)||n.registGlobalListener("curPlayUrlChange",we),ee.curUseReferMusic=R.curUseReferMusic}),A(()=>{var e,t,o,i;null==(i=null==(o=null==(t=null==(e=null==G?void 0:G.config)?void 0:e.globalProperties)?void 0:t.$globalMediaUtils)?void 0:o.globalAudioPlayer)||i.releaseGlobalListener("curPlayUrlChange",we)}),(o,i)=>{var r;const s=Ie;return t(),e("div",{ref_key:"referMusicItem",ref:K,class:n(["audio-item-tts-voice-box",`audio-item-tts-voice-box--${f(V)}`]),"data-tts-voice-id":null==(r=ee.item)?void 0:r.id},[g(ke,{ref_key:"refPlayer",ref:J,url:`${f($)(ee.item.mp3_url)}?tts_voice_tab_code=${Q.tabCode}&id=${ee.item.id}`,loop:!1,duration:ee.duration,onSyncDuration:te,onSyncPlayState:oe,onSyncLoadingState:ie,onSyncProgress:ne},{default:v(()=>{var o,r,d,c,u,p,h,y,_;return[a("div",{class:n(["audio-item-voice",{active:ee.isCurPlay}]),onClick:i[2]||(i[2]=T(()=>{"index"==Q.renderType?le():ce()},["stop"]))},[a("div",Bi,[g(Se,{src:(null==(o=ee.item)?void 0:o.cover)?f($)(null==(r=ee.item)?void 0:r.cover):f(X),alt:"Default Cover of Ai Music Generator on Mureka.ai"},null,8,["src"]),a("div",{class:"audio-item-tts-voice-op flex-center",onClick:T(le,["stop"])},[a("i",{class:n(["block",{"isplay-true":ee.isplay,"isplay-false":!ee.isplay}])},null,2)])]),a("div",Oi,[a("div",zi,[a("div",qi,l((_=Q.item.title??"",_?_.replace(/(.mp3|.mp4|.wav)$/,""):"")),1)]),a("div",Hi,l(`${f(Te).formatTime(ee.isCurPlay?ee.duration*(100-ee.progress)/100:ee.duration)}`)+" | "+l(null==(d=ee.item)?void 0:d.description),1)]),a("div",ji,[a("i",{class:"block",style:m({backgroundImage:`url(${null==(u=f(ft)(null==(c=ee.item)?void 0:c.language))?void 0:u.ico})`,backgroundSize:"100% 100%"})},null,4)]),a("div",Ni,[a("div",Wi,[g(f(U),{type:"tonal",size:"small",onClick:T(ce,["stop"])},{default:v(()=>[x(l(f(z)("create.use")),1)]),_:1})]),"index"!=Q.renderType||["3"].includes(Q.tabCode)?b("",!0):(t(),e("div",{key:0,class:n(["audio-item-ico-btn audio-item-ico-btn-like-state pointer flex-center",{"liked-true":1==(null==(p=ee.item)?void 0:p.is_liked)}]),onClick:i[0]||(i[0]=T(()=>{new Promise((e,t)=>
1{const o=1==ee.item.is_liked?2:1;j.favoriteTtsVoiceinfo({id:ee.item.id,is_liked:o}).then(e=>{200==e.code&&(Object.assign(ee.item,{is_liked:o}),R.updateReferMusicInfo(ee.item.id,{is_liked:o}),1==o?(R.insertReferItemFromList(ee.item,"liked"),C(()=>{Z("like",ee.item)})):(R.removeReferItemFromList(ee.item,"liked"),C(()=>{Z("unlike",ee.item)})))})})},["stop"]))},[a("i",{class:n(["block",{"like-true":1==(null==(h=ee.item)?void 0:h.is_liked)&&1!=(null==(y=ee.item)?void 0:y.is_disliked)}])},null,2)],2)),ee.isRenderMore&&"index"==Q.renderType&&["3"].includes(Q.tabCode)?(t(),e("div",Yi,[g(s,{ref:"refPopover","popper-class":"audio-item-more-popover",placement:"left-start",disabled:"mobile"==f(V),"popper-options":{modifiers:[{name:"offset",options:{offset:[0,0]}}]}},{reference:v(()=>[a("div",{class:"audio-item-tts-voice-more-btn pointer flex-center",onClick:T(ue,["stop"])},[...i[7]||(i[7]=[a("i",{class:"block"},null,-1)])])]),default:v(()=>[a("div",Gi,[a("div",Qi,[a("div",{class:"audio-item-tts-voice-more-list-item pointer",onClick:i[1]||(i[1]=T(()=>{ee.item.public_at>0?fe():me()},["stop"]))},l(ee.item.public_at>0?f(z)("create.published"):f(z)("create.publish")),1),!ee.item.public_at>0?(t(),e("div",{key:0,class:"audio-item-tts-voice-more-list-item pointer",onClick:T(ve,["stop"])},l(f(z)("tts.edit_voice_info")),1)):b("",!0),a("div",{class:"audio-item-tts-voice-more-list-item pointer",onClick:T(ye,["stop"])},l(f(z)("create.delete")),1)])])]),_:1},8,["disabled"])])):b("",!0)])],2)]}),_:1},8,["url","duration"]),ee.reportDialogVisible?(t(),h(Ae,{key:0,visible:ee.reportDialogVisible,"onUpdate:visible":i[3]||(i[3]=e=>ee.reportDialogVisible=e),data:ee.item,"report-type":5},null,8,["visible","data"])):b("",!0),ee.moreDialogVisible&&"mobile"==f(V)?(t(),h(Fi,{key:1,visible:ee.moreDialogVisible,"onUpdate:visible":i[4]||(i[4]=e=>ee.moreDialogVisible=e),"render-type":Q.renderType,item:ee.item,onReport:pe,onPublish:me,onCancelPublish:fe,onEditInfo:ve,onDelete:ye},null,8,["visible","render-type","item"])):b("",!0),ee.goToPublishDialog?(t(),h(Di,{key:2,visible:ee.goToPublishDialog,"onUpdate:visible":i[5]||(i[5]=e=>ee.goToPublishDialog=e),pitem:Q.pitem,item:ee.item,onComplete:be},null,8,["visible","pitem","item"])):b("",!0),ee.editSongInfoDialogVisible?(t(),h(hi,{key:3,visible:ee.editSongInfoDialogVisible,"onUpdate:visible":i[6]||(i[6]=e=>ee.editSongInfoDialogVisible=e),pitem:Q.pitem,item:ee.item,onComplete:he},null,8,["visible","pitem","item"])):b("",!0)],10,Ui)}}},Xi={class:"height-all refer-music-list"},Ji={class:"height-all refer-music-list-main flex-column"},Zi={class:"refer-music-list-box height-0 flex1"},en={class:"refer-music-item"},tn={__name:"referMusicListAll",props:{renderType:{type:String,default:""},filterOpenState:{type:Boolean,default:!1},isCurShow:{type:Boolean,default:!1}},emits:["update:filterOpenState","apply","cancel","more"],setup(o,{emit:i}){var n,l,r,d;E();const p=W();null==(d=null==(r=null==(l=(_()||(null==(n=null==window?void 0:window.$getVueCurrentInstance)?void 0:n.call(window))).appContext)?void 0:l.config)?void 0:r.globalProperties)||d.$router,s();const m=o,f=i,b=c({filterOpenState:!1,referDatas:[],refreshing:!1,loadingMore:!1,isLoading:!1,loadError:!1,finished:!1,filterParams:{query_type:1},initLoading:!1}),y=(e,t)=>{b.isLoading=!0,p.refresh(C(),(...t)=>{b.finished=t[1]??!0,b.isLoading=!1,b.loadError=!1,e(...t)},(...e)=>{b.isLoading=!1,b.loadError=!0,t(...e)})},x=(e,t)=>{b.isLoading=!0,p.loadMore(C(),(...t)=>{b.finished=t[1]??!0,b.isLoading=!1,e(...t)},(...e)=>{b.isLoading=!1,t(...e)})},k=e=>{e||(b.initLoading=!0),b.isLoading=!0,p.init(C(),(...e)=>{b.isLoading=!1,b.finished=e[1]??!0,b.loadError=!1,b.initLoading=!1},(...e)=>{b.isLoading=!1,b.loadError=!0,b.initLoading=!1})},C=()=>(b.filterParams={query_type:"1_1"},b.filterParams),S=e=>{f("apply",e,"1_1")},T=e=>{f("cancel",e,"1_1")},A=e=>{f("more",e,"1_1")};w(()=>m.filterOpenState,(e,t)=>{b.filterOpenState=m.filterOpenState}),w(()=>b.filterOpenState,(e,t)=>{f("update:filterOpenState",e)}),w(()=>p.datas_all_all,(e,t)=>{b.referDatas=p.datas_all_all}),w(()=>m.isCurShow,(e,t)=>{m.isCurShow&&!p[`hasInit_${p.TabDataSuffixMap[C().query_type]}`]&&k()});return u(()=>{var e;(null==(e=p.datas_all_all)?void 0:e.length)?(b.referDatas=p.datas_all_all,b.initLoading=!1):k()}),(o,i)=>(t(),e("div",Xi,[a("div",Ji,[a("div",Zi,[b.loadError||b.initLoading?(t(),h(we,{key:0,loading:b.initLoading,onRetry:i[0]||(i[0]=()=>{k(!0)})},null,8,["loading"])):(t(),h(xe,{key:1,itemIdField:"id",datas:b.referDatas,refreshing:b.refreshing,"onUpdate:refreshing":i[1]||(i[1]=e=>b.refreshing=e),loadingMore:b.loadingMore,"onUpdate:loadingMore":i[2]||(i[2]=e=>b.loadingMore=e),isLoading:b.isLoading,"onUpdate:isLoading":i[3]||(i[3]=e=>b.isLoading=e),finished:b.finished,"onUpdate:finished":i[4]||(i[4]=e=>b.finished=e),onRefresh:y,onLoadMore:x},{default:v(e=>[a("div",en,[g(Ki,{renderType:m.renderType,tabCode:"1_1",item:e.item,index:e.index,onApply:S,onCancel:T,onMore:A},null,8,["renderType","item","index"])])]),_:1},8,["datas","refreshing","loadingMore","isLoading","finished"]))])])]))}},on={class:"height-all refer-music-list"},nn={class:"height-all refer-music-list-main flex-column"},an={class:"refer-music-list-box height-0 flex1"},ln={class:"refer-music-item"},rn={__name:"referMusicListAllQuality",props:{renderType:{type:String,default:""},filterOpenState:{type:Boolean,default:!1},isCurShow:{type:Boolean,default:!1}},emits:["update:filterOpenState","apply","cancel","more"],setup(o,{emit:i}){var n,l,r,d;E();const p=W();null==(d=null==(r=null==(l=(_()||(null==(n=null==window?void 0:window.$getVueCurrentInstance)?void 0:n.call(window))).appContext)?void 0:l.config)?void 0:r.globalProperties)||d.$router,s();const m=o,f=i,b=c({filterOpenState:!1,referDatas:[],refreshing:!1,loadingMore:!1,isLoading:!1,loadError:!1,finished:!1,filterParams:{query_type:1},initLoading:!1}),y=(e,t)=>{b.isLoading=!0,p.refresh(C(),(...t)=>{b.finished=t[1]??!0,b.isLoading=!1,b.loadError=!1,e(...t)},(...e)=>{b.isLoading=!1,b.loadError=!0,t(...e)})},x=(e,t)=>{b.isLoading=!0,p.loadMore(C(),(...t)=>{b.finished=t[1]??!0,b.isLoading=!1,e(...t)},(...e)=>{b.isLoading=!1,t(...e)})},k=e=>{e||(b.initLoading=!0),b.isLoading=!0,p.init(C(),(...e)=>{b.isLoading=!1,b.finished=e[1]??!0,b.loadError=!1,b.initLoading=!1},(...e)=>{b.isLoading=!1,b.loadError=!0,b.initLoading=!1})},C=()=>(b.filterParams={query_type:"1_2"},b.filterParams),S=e=>{f("apply",e,"1_2")},T=e=>{f("cancel",e,"1_2")},A=e=>{f("more",e,"1_2")};w(()=>m.filterOpenState,(e,t)=>{b.filterOpenState=m.filterOpenState}),w(()=>b.filterOpenState,(e,t)=>{f("update:filterOpenState",e)}),w(()=>p.datas_all_quality,(e,t)=>{b.referDatas=p.datas_all_quality}),w(()=>m.isCurShow,(e,t)=>{m.isCurShow&&!p[`hasInit_${p.TabDataSuffixMap[C().query_type]}`]&&k()});return u(()=>{k()}),(o,i)=>(t(),e("div",on,[a("div",nn,[a("div",an,[b.loadError||b.initLoading?(t(),h(we,{key:0,loading:b.initLoading,onRetry:i[0]||(i[0]=()=>{k(!0)})},null,8,["loading"])):(t(),h(xe,{key:1,itemIdField:"id",datas:b.referDatas,refreshing:b.refreshing,"onUpdate:refreshing":i[1]||(i[1]=e=>b.refreshing=e),loadingMore:b.loadingMore,"onUpdate:loadingMore":i[2]||(i[2]=e=>b.loadingMore=e),isLoading:b.isLoading,"onUpdate:isLoading":i[3]||(i[3]=e=>b.isLoading=e),finished:b.finished,"onUpdate:finished":i[4]||(i[4]=e=>b.finished=e),onRefresh:y,onLoadMore:x},{default:v(e=>[a("div",ln,[g(Ki,{renderType:m.renderType,tabCode:"1_2",item:e.item,index:e.index,onApply:S,onCancel:T,onMore:A},null,8,["renderType","item","index"])])]),_:1},8,["datas","refreshing","loadingMore","isLoading","finished"]))])])]))}},sn={class:"height-all refer-music-list"},dn={class:"height-all refer-music-list-main flex-column"},cn={class:"refer-music-list-box height-0 flex1"},un={class:"refer-music-item"},pn={__name:"referMusicListLiked",props:{renderType:{type:String,default:""},filterOpenState:{type:Boolean,default:!1},isCurShow:{type:Boolean,default:!1}},emits:["update:filterOpenState","apply","cancel","more"],setup(o,{emit:i}){var n,l,r,d;const p=E(),m=W();null==(d=null==(r=null==(l=(_()||(null==(n=null==window?void 0:window.$getVueCurrentInstance)?void 0:n.call(window))).appContext)?void 0:l.config)?void 0:r.globalProperties)||d.$router,s();const f=o,b=i,y=c({filterOpenState:!1,referDatas:[],refreshing:!1,loadingMore:!1,isLoading:!1,loadError:!1,finished:!1,filterParams:{query_type:1},initLoading:!1}),x=(e,t)=>{y.isLoading=!0,m.refresh(S(),(...t)=>{y.finished=t[1]??!0,y.isLoading=!1,y.loadError=!1,e(...t)},(...e)=>{y.isLoading=!1,y.loadError=!0,t(...e)})},k=(e,t)=>{y.isLoading=!0,m.loadMore(S(),(...t)=>{y.finished=t[1]??!0,y.isLoading=!1,e(...t)},(...e)=>{y.isLoading=!1,t(...e)})},C=e=>{e||(y.initLoading=!0),y.isLoading=!0,m.init(S(),(...e)=>{y.isLoading=!1,y.finished=e[1]??!0,y.loadError=!1,y.initLoading=!1},(...e)=>{y.isLoading=!1,y.loadError=!0,y.initLoading=!1})},S=()=>(y.filterParams={query_type:4},y.filterParams),T=e=>{b("apply",e,4)},A=e=>{b("cancel",e,4)},I=e=>{b("more",e,4)},L=e=>{var t;(null==(t=y.referDatas)?void 0:t.length)||C()};w(()=>f.filterOpenState,(e,t)=>{y.filterOpenState=f.filterOpenState}),w(()=>y.filterOpenState,(e,t)=>{b("update:filterOpenState",e)}),w(()=>m.datas_liked,(e,t)=>{y.referDatas=m.datas_liked}),w(()=>f.isCurShow,(e,t)=>{f.isCurShow&&!m[`hasInit_${m.TabDataSuffixMap[S().query_type]}`]&&C()});return u(()=>{p.isLogin?C():(y.initLoading=!1,y.finished=!0)}),(o,i)=>(t(),e("div",sn,[a("div",dn,[a("div",cn,[y.loadError||y.initLoading?(t(),h(we,{key:0,loading:y.initLoading,onRetry:i[0]||(i[0]=()=>{C(!0)})},null,8,["loading"])):(t(),h(xe,{key:1,itemIdField:"id",datas:y.referDatas,refreshing:y.refreshing,"onUpdate:refreshing":i[1]||(i[1]=e=>y.refreshing=e),loadingMore:y.loadingMore,"onUpdate:loadingMore":i[2]||(i[2]=e=>y.loadingMore=e),isLoading:y.isLoading,"onUpdate:isLoading":i[3]||(i[3]=e=>y.isLoading=e),finished:y.finished,"onUpdate:finished":i[4]||(i[4]=e=>y.finished=e),onRefresh:x,onLoadMore:k},{default:v(e=>[a("div",un,[g(Ki,{renderType:f.renderType,tabCode:"4",item:e.item,index:e.index,onApply:T,onCancel:A,onMore:I,onUnlike:L},null,8,["renderType","item","index"])])]),_:1},8,["datas","refreshing","loadingMore","isLoading","finished"]))])])]))}},gn={class:"height-all refer-music-list"},vn={class:"height-all refer-music-list-main flex-column"},mn={class:"refer-music-list-box height-0 flex1"},fn={class:"refer-music-item"},hn={__name:"referMusicListSearch",props:{renderType:{type:String,default:""},filterValue:{type:String,default:""},filterOpenState:{type:Boolean,default:!1},isCurShow:{type:Boolean,default:!1}},emits:["update:filterOpenState","apply","cancel","more"],setup(o,{emit:i}){var n,l,r,d;const p=W();null==(d=null==(r=null==(l=(_()||(null==(n=null==window?void 0:window.$getVueCurrentInstance)?void 0:n.call(window))).appContext)?void 0:l.config)?void 0:r.globalProperties)||d.$router,s();const m=o,f=i,b=c({filterOpenState:!1,referDatas:[],refreshing:!1,loadingMore:!1,isLoading:!1,loadError:!1,finished:!1,filterParams:{query_type:1},initLoading:!1}),y=(e,t)=>{b.isLoading=!0,p.refresh(C(),(...t)=>{b.finished=t[1]??!0,b.isLoading=!1,b.loadError=!1,e(...t)},(...e)=>{b.isLoading=!1,b.loadError=!0,t(...e)})},x=(e,t)=>{b.isLoading=!0,p.loadMore(C(),(...t)=>{b.finished=t[1]??!0,b.isLoading=!1,e(...t)},(...e)=>{b.isLoading=!1,t(...e)})},k=e=>{e||(b.initLoading=!0),b.isLoading=!0,p.init(C(),(...e)=>{b.isLoading=!1,b.finished=e[1]??!0,b.loadError=!1,b.initLoading=!1},(...e)=>{b.isLoading=!1,b.loadError=!0,b.initLoading=!1})},C=()=>(b.filterParams={search_term:m.filterValue,query_type:0},b.filterParams),S=e=>{f("apply",e,0)},T=e=>{f("cancel",e,0)},A=e=>{f("more",e,0)};w(()=>m.filterOpenState,(e,t)=>{b.filterOpenState=m.filterOpenState}),w(()=>b.filterOpenState,(e,t)=>{f("update:filterOpenState",e)}),w(()=>p.datas_search,(e,t)=>{b.referDatas=p.datas_search}),w(()=>m.isCurShow,(e,t)=>{m.isCurShow&&!p[`hasInit_${p.TabDataSuffixMap[C().query_type]}`]&&k()}),w(()=>m.filterValue,(e,t)=>{k()});return u(()=>{k()}),(o,i)=>(t(),e("div",gn,[a("div",vn,[a("div",mn,[b.loadError||b.initLoading?(t(),h(we,{key:0,loading:b.initLoading,onRetry:i[0]||(i[0]=()=>{k(!0)})},null,8,["loading"])):(t(),h(xe,{key:1,itemIdField:"id",datas:b.referDatas,refreshing:b.refreshing,"onUpdate:refreshing":i[1]||(i[1]=e=>b.refreshing=e),loadingMore:b.loadingMore,"onUpdate:loadingMore":i[2]||(i[2]=e=>b.loadingMore=e),isLoading:b.isLoading,"onUpdate:isLoading":i[3]||(i[3]=e=>b.isLoading=e),finished:b.finished,"onUpdate:finished":i[4]||(i[4]=e=>b.finished=e),onRefresh:y,onLoadMore:x},{default:v(e=>[a("div",fn,[g(Ki,{renderType:m.renderType,item:e.item,index:e.index,tabCode:"0",onApply:S,onCancel:T,onMore:A},null,8,["renderType","item","index"])])]),_:1},8,["datas","refreshing","loadingMore","isLoading","finished"]))])])]))}},bn={class:"height-all refer-music-list"},yn={class:"refer-music-list-box height-all"},_n={class:"refer-music-item"},wn={__name:"referMusicListUpload",props:{renderType:{type:String,default:""},isCurShow:{type:Boolean,default:!1}},emits:["apply","cancel","more","delete"],setup(o,{emit:i}){var n,l,r,d;const p=E(),m=W();null==(d=null==(r=null==(l=(_()||(null==(n=null==window?void 0:window.$getVueCurrentInstance)?void 0:n.call(window))).appContext)?void 0:l.config)?void 0:r.globalProperties)||d.$router,s();const f=o,b=i,y=c({filterValue:null,referDatas:[],refreshing:!1,loadingMore:!1,isLoading:!1,loadError:!1,finished:!1,initLoading:!1}),x=(e,t)=>{y.isLoading=!0,m.refresh(S(),(...t)=>{y.finished=t[1]??!0,y.isLoading=!1,y.loadError=!1,e(...t)},(...e)=>{y.isLoading=!1,y.loadError=!0,t(...e)})},k=(e,t)=>{y.isLoading=!0,m.loadMore(S(),(...t)=>{y.finished=t[1]??!0,y.isLoading=!1,e(...t)},(...e)=>{y.isLoading=!1,t(...e)})},C=e=>{e||(y.initLoading=!0),y.isLoading=!0,m.init(S(),(...e)=>{y.isLoading=!1,y.finished=e[1]??!0,y.loadError=!1,y.initLoading=!1},(...e)=>{y.isLoading=!1,y.loadError=!0,y.initLoading=!1})},S=()=>({query_type:3}),T=e=>{b("apply",e,3)},A=e=>{b("cancel",e,3)},I=e=>{b("more",e,3)},L=e=>{b("delete",e,3)};w(()=>m.datas_upload,(e,t)=>{y.referDatas=m.datas_upload}),w(()=>f.isCurShow,(e,t)=>{f.isCurShow&&!m[`hasInit_${m.TabDataSuffixMap[S().query_type]}`]&&C()});return u(()=>{var e;(null==(e=m.datas_upload)?void 0:e.length)?(y.referDatas=m.datas_upload,y.initLoading=!1):p.isLogin?C():(y.initLoading=!1,y.finished=!0)}),(o,i)=>(t(),e("div",bn,[a("div",yn,[y.loadError||y.initLoading?(t(),h(we,{key:0,loading:y.initLoading,onRetry:i[0]||(i[0]=()=>{C(!0)})},null,8,["loading"])):(t(),h(xe,{key:1,itemIdField:"id",datas:y.referDatas,refreshing:y.refreshing,"onUpdate:refreshing":i[1]||(i[1]=e=>y.refreshing=e),loadingMore:y.loadingMore,"onUpdate:loadingMore":i[2]||(i[2]=e=>y.loadingMore=e),isLoading:y.isLoading,"onUpdate:isLoading":i[3]||(i[3]=e=>y.isLoading=e),finished:y.finished,"onUpdate:finished":i[4]||(i[4]=e=>y.finished=e),onRefresh:x,onLoadMore:k},{default:v(e=>[a("div",_n,[g(Ki,{renderType:f.renderType,hideFrom:"",item:e.item,index:e.index,tabCode:"3",onApply:T,onCancel:A,onMore:I,onDelete:L},null,8,["renderType","item","index"])])]),_:1},8,["datas","refreshing","loadingMore","isLoading","finished"]))])]))}},xn={class:"height-all refer-music-list"},kn={class:"refer-music-list-box height-all"},Cn={class:"refer-music-item"},Sn={__name:"referMusicListUsed",props:{renderType:{type:String,default:""},isCurShow:{type:Boolean,default:!1}},emits:["apply","cancel","more"],setup(o,{emit:i}){var n,l,r,d;const p=E(),m=W();null==(d=null==(r=null==(l=(_()||(null==(n=null==window?void 0:window.$getVueCurrentInstance)?void 0:n.call(window))).appContext)?void 0:l.config)?void 0:r.globalProperties)||d.$router,s();const f=o,b=i,y=c({filterValue:null,referDatas:[],refreshing:!1,loadingMore:!1,isLoading:!1,loadError:!1,finished:!1,initLoading:!1}),x=(e,t)=>{y.isLoading=!0,m.refresh(S(),(...t)=>{y.finished=t[1]??!0,y.isLoading=!1,y.loadError=!1,e(...t)},(...e)=>{y.isLoading=!1,y.loadError=!0,t(...e)})},k=(e,t)=>{y.isLoading=!0,m.loadMore(S(),(...t)=>{y.finished=t[1]??!0,y.isLoading=!1,e(...t)},(...e)=>{y.isLoading=!1,t(...e)})},C=e=>{e||(y.initLoading=!0),y.isLoading=!0,m.init(S(),(...e)=>{y.isLoading=!1,y.finished=e[1]??!0,y.loadError=!1,y.initLoading=!1},(...e)=>{y.isLoading=!1,y.loadError=!0,y.initLoading=!1})},S=()=>({query_type:2}),T=e=>{b("apply",e,2)},A=e=>{b("cancel",e,2)},I=e=>{b("more",e,2)};w(()=>m.datas_used,(e,t)=>{y.referDatas=m.datas_used
1}),w(()=>f.isCurShow,(e,t)=>{f.isCurShow&&!m[`hasInit_${m.TabDataSuffixMap[S().query_type]}`]&&C()});return u(()=>{p.isLogin?C():(y.initLoading=!1,y.finished=!0)}),(o,i)=>(t(),e("div",xn,[a("div",kn,[y.loadError||y.initLoading?(t(),h(we,{key:0,loading:y.initLoading,onRetry:i[0]||(i[0]=()=>{C(!0)})},null,8,["loading"])):(t(),h(xe,{key:1,itemIdField:"id",datas:y.referDatas,refreshing:y.refreshing,"onUpdate:refreshing":i[1]||(i[1]=e=>y.refreshing=e),loadingMore:y.loadingMore,"onUpdate:loadingMore":i[2]||(i[2]=e=>y.loadingMore=e),isLoading:y.isLoading,"onUpdate:isLoading":i[3]||(i[3]=e=>y.isLoading=e),finished:y.finished,"onUpdate:finished":i[4]||(i[4]=e=>y.finished=e),onRefresh:x,onLoadMore:k},{default:v(e=>[a("div",Cn,[g(Ki,{renderType:f.renderType,hideFrom:"",isUsed:"",item:e.item,index:e.index,tabCode:"2",onApply:T,onCancel:A,onMore:I},null,8,["renderType","item","index"])])]),_:1},8,["datas","refreshing","loadingMore","isLoading","finished"]))])]))}},Tn={class:"tts-voice-library-and-add-edit-item flex1 width-0"},An={class:"tts-voice-library-and-add-edit-item flex1 width-0"},In={class:"tts-voice-library-and-add-tab-search-box"},Ln={class:"flex"},Pn={key:0,class:"tts-voice-library-and-add-tab-search-add flex"},Mn={class:"tts-voice-library-and-add-edit-item"},Vn={class:"tts-voice-library-and-add-edit-item"},Dn={key:0,class:"tts-voice-library-and-add-tab-box"},$n={key:1,class:"tts-voice-library-and-add-tab-search-add flex"},Rn={class:"tts-voice-library-and-add-edit-item"},En={class:"tts-voice-library-and-add-edit-item"},Fn={__name:"voiceLibrary",props:{renderType:{type:String,default:"dialog"},visible:{type:Boolean,default:!1}},emits:["update:visible","apply"],setup(o,{emit:i}){var l;const r=J(),s=E(),p=F(),{createRenderType:v}=y(p),m=W(),{$$language:x,$$t:k,$$tm:C,$$tValue:S}=(null==(l=_().appContext)?void 0:l.config.globalProperties.$i18n)??{},T=o,M=i,V=d(null),D=c({visible:T.visible,clipSourceData:null,topActiveTabCode:"1",activeTab:"1",activeTabCode:"1_1",activeTab2Code:"1_1",moreDialogVisible:!1,reportDialogVisible:!1,reportSmId:null,reportItem:null,isShowSearch:!1,filterValue:"",isShowTab2:!0}),$=e=>({topActiveTabCode:D.topActiveTabCode,activeTab:D.activeTab,activeTabCode:D.activeTabCode,activeTab2Code:D.activeTab2Code}),R=e=>{var t;(_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties,1==e?1!=D.topActiveTabCode?(D.topActiveTabCode=e,D.activeTabCode=D.activeTab2Code):(D.topActiveTabCode=e,O(!0)):(D.topActiveTabCode=e,D.activeTabCode=e,O(!1))},U=e=>{D.filterValue=e},B=e=>{D.activeTab2Code=e,D.activeTabCode=e,O(!1)},O=e=>{D.isShowTab2=e??!D.isShowTab2},z=(e,{membership_source1:t,membership_source2:o})=>{r.handleSubscribe({membership_source1:t,membership_source2:o})},q=(e,t,o=!0)=>{var i;const n=(_()||(null==(i=null==window?void 0:window.$getVueCurrentInstance)?void 0:i.call(window))).appContext.config.globalProperties;null==n||n.logClickEvent("voice_pop_voice_use",{content_id:e.id,source:"index"==T.renderType?"from_voice_library":"from_text_to_speech"}),m.setCurUseMusic(e),M("apply",e),D.visible=!1},H=e=>{m.setCurUseMusic(null)},j=e=>{},N=(e,t)=>{m.deleteReferItem(e,t)},Y=(e,t)=>{D.activeTabCode="3",D.topActiveTabCode="3",m.insertUploadData(e)};w(()=>T.visible,e=>{D.visible=T.visible}),w(()=>D.visible,e=>{M("update:visible",e)});const G=()=>{O(!1)};return I(()=>{m.setTabCodeData($(),"dialog"==T.renderType)}),A(()=>{m.setTabCodeData($())}),u(()=>{var e;e=m.getTabCodeData("dialog"==T.renderType),Object.assign(D,e),document.addEventListener("click",G)}),A(()=>{p.setVocalCornerMarkVisible(!1),document.removeEventListener("click",G)}),(o,i)=>(t(),e("div",{class:n(["height-all tts-voice-library-and-add flex-column",{[`tts-voice-library-and-add--${f(v)}`]:!0,"tts-voice-library-and-add--index":"index"==T.renderType,"tts-voice-library-and-add--dialog":"dialog"==T.renderType}])},["dialog"==T.renderType?(t(),e("div",{key:0,class:n(["tts-voice-library-and-add-edits",{"tts-voice-library-and-add-edits-disable":!f(s).isLogin}])},[a("div",Tn,[g(Qo,{type:"renderDialog","render-type":T.renderType,onShowSubscribeDialog:z,onSaveVoiceSuccess:Y},null,8,["render-type"])]),a("div",An,[g(xo,{type:"renderDialog","render-type":T.renderType,onShowSubscribeDialog:z,onSaveVoiceSuccess:Y},null,8,["render-type"])])],2)):b("",!0),a("div",In,[a("div",Ln,[g(ti,{"is-show-search":D.isShowSearch,"onUpdate:isShowSearch":i[0]||(i[0]=e=>D.isShowSearch=e),"active-tab-code":D.topActiveTabCode,"onUpdate:activeTabCode":i[1]||(i[1]=e=>D.topActiveTabCode=e),"active-tab2-code":D.activeTab2Code,"filter-value":D.filterValue,"render-type":T.renderType,"arrow-active":D.isShowTab2,onOnTabClick:R,onOnSearch:U},null,8,["is-show-search","active-tab-code","active-tab2-code","filter-value","render-type","arrow-active"]),"index"==T.renderType&&"pc"==f(v)?(t(),e("div",Pn,[a("div",Mn,[g(Qo,{"render-type":T.renderType,onShowSubscribeDialog:z,onSaveVoiceSuccess:Y},null,8,["render-type"])]),a("div",Vn,[g(xo,{"render-type":T.renderType,onShowSubscribeDialog:z,onSaveVoiceSuccess:Y},null,8,["render-type"])])])):b("",!0)]),!D.isShowSearch&&["1_1","1_2"].includes(D.activeTabCode)?L((t(),e("div",Dn,[g(De,{modelValue:D.activeTab2Code,"onUpdate:modelValue":i[2]||(i[2]=e=>D.activeTab2Code=e),tabs:[{label:f(k)("create.all"),value:"1_1"},{label:f(k)("tts.trending_voices"),value:"1_2"}],onTabClick:B},null,8,["modelValue","tabs"])],512)),[[P,"index"!=T.renderType||D.isShowTab2]]):b("",!0)]),a("div",{ref_key:"referListParentBox",ref:V,class:"tts-voice-library-and-add-tab-content flex1 height-0"},[L(g(tn,{"is-cur-show":!D.isShowSearch&&"1_1"==D.activeTabCode,"render-type":T.renderType,onApply:q,onCancel:H,onMore:j},null,8,["is-cur-show","render-type"]),[[P,!D.isShowSearch&&"1_1"==D.activeTabCode]]),D.isShowSearch||"2"!=D.activeTabCode||"dialog"!=T.renderType?b("",!0):(t(),h(Sn,{key:0,"is-cur-show":!D.isShowSearch&&"2"==D.activeTabCode,"render-type":T.renderType,onApply:q,onCancel:H,onMore:j},null,8,["is-cur-show","render-type"])),L(g(wn,{"is-cur-show":!D.isShowSearch&&"3"==D.activeTabCode,"render-type":T.renderType,onApply:q,onCancel:H,onMore:j,onDelete:N},null,8,["is-cur-show","render-type"]),[[P,!D.isShowSearch&&"3"==D.activeTabCode]]),D.isShowSearch||"4"!=D.activeTabCode?b("",!0):(t(),h(pn,{key:1,"is-cur-show":!D.isShowSearch&&"4"==D.activeTabCode,"render-type":T.renderType,onApply:q,onCancel:H,onMore:j},null,8,["is-cur-show","render-type"])),D.isShowSearch||"1_2"!=D.activeTabCode?b("",!0):(t(),h(rn,{key:2,"is-cur-show":D.isShowSearch&&"1_2"==D.activeTabCode,"render-type":T.renderType,onApply:q,onCancel:H,onMore:j},null,8,["is-cur-show","render-type"])),D.isShowSearch&&"dialog"==T.renderType?(t(),h(hn,{key:3,"is-cur-show":D.isShowSearch,"render-type":T.renderType,"filter-value":D.filterValue,onApply:q,onCancel:H,onMore:j},null,8,["is-cur-show","render-type","filter-value"])):b("",!0)],512),"index"==T.renderType&&"mobile"==f(v)?(t(),e("div",$n,[a("div",Rn,[g(Qo,{"render-type":T.renderType,"is-library":!0,onShowSubscribeDialog:z,onSaveVoiceSuccess:Y},null,8,["render-type"])]),a("div",En,[g(xo,{"render-type":T.renderType,"is-library":!0,onShowSubscribeDialog:z,onSaveVoiceSuccess:Y},null,8,["render-type"])])])):b("",!0)],2))}},Un={__name:"addReference",props:{renderType:{type:String,default:""},visible:{type:Boolean,default:!1}},emits:["update:visible","apply","showSubscribeDialog"],setup(e,{emit:o}){var i;const n=F(),{createRenderType:a}=y(n),{$$language:l,$$t:r,$$tm:s,$$tValue:d}=(null==(i=_().appContext)?void 0:i.config.globalProperties.$i18n)??{},u=e,p=o,m=c({visible:u.visible}),b=()=>{m.visible=!1},x=(...e)=>{p("apply",...e)};return w(()=>u.visible,e=>{m.visible=u.visible}),w(()=>m.visible,e=>{p("update:visible",e)}),(e,o)=>(t(),h(q,{width:"720px",height:"mobile"==f(a)?"calc(100vh - 50px)":"712px",titleAlign:"left",title:f(r)("tts.select_voice"),visible:m.visible,onClose:b,customClass:"add-music-tts-voice-dialog",mobileRenderType:"drawerDialog"},{default:v(()=>[g(Fn,{renderType:"dialog",visible:m.visible,"onUpdate:visible":o[0]||(o[0]=e=>m.visible=e),onApply:x},null,8,["visible"])]),_:1},8,["height","title","visible"]))}},Bn=["placeholder","value"],On={class:"add-voice-style-input-edit-count"},zn={class:"add-voice-style-input-done-btn-box"},qn={class:"add-voice-style-input-done-btn"},Hn={__name:"addVoiceStyleDialog",props:{voiceStyle:{type:String,default:""},visible:{type:Boolean,default:!0}},emits:["update:visible","done"],setup(e,{emit:o}){var i,r,s,p,m,b,k;const C=F(),{createRenderType:S}=y(C);null==(s=null==(r=(_()||(null==(i=null==window?void 0:window.$getVueCurrentInstance)?void 0:i.call(window))).appContext)?void 0:r.config)||s.globalProperties,null==(k=null==(b=null==(m=(_()||(null==(p=null==window?void 0:window.$getVueCurrentInstance)?void 0:p.call(window))).appContext)?void 0:m.config)?void 0:b.globalProperties)||k.$router;const T=e,A=o,I=d(null),L=c({visible:T.visible,voiceStyle:T.voiceStyle}),P=e=>{var t;
1null==(t=I.value)||t.focus()},M=()=>{L.inputing=!0},V=e=>{L.inputing=!1,D(e)},D=e=>{L.inputing||(e.target.value.length>500&&(e.target.value=e.target.value.slice(0,500)),L.voiceStyle=e.target.value,A("update:voiceStyle",L.voiceStyle))},$=e=>{A("update:voiceStyle",L.voiceStyle)},R=async()=>{var e;(null==(e=L.voiceStyle)?void 0:e.length)<=0||A("done",L.voiceStyle||"")},E=()=>{L.visible=!1};return w(()=>T.visible,e=>{var t;L.visible=T.visible,L.voiceStyle=T.voiceStyle,T.visible&&(null==(t=I.value)||t.focus())}),w(()=>L.visible,e=>{A("update:visible",e)}),u(()=>{var e;null==(e=I.value)||e.focus()}),(e,o)=>(t(),h(q,{width:"720px",height:"unset",titleAlign:"left",title:f(ue)("tts.add_voice_style"),visible:L.visible,onClose:E,mobileRenderType:"drawerDialog"},{default:v(()=>{var e,t;return[a("div",{class:n(["height-all add-voice-style-input flex-column",{"add-voice-style-input--mobile":"mobile"==f(S)}])},[a("div",{class:"add-voice-style-input-edit flex",onClick:P},[a("textarea",{ref_key:"refInput",ref:I,placeholder:f(ue)("tts.voice_style_placeholder"),class:"flex1 width-0",value:L.voiceStyle,onInput:D,onChange:$,onCompositionstart:M,onCompositionend:V},null,40,Bn),a("div",On,l((null==(e=L.voiceStyle)?void 0:e.length)??0)+"/ "+l(500),1)]),a("div",zn,[a("div",qn,[g(K,{onClick:R,renderStyle:{"--padding":"0","--width":"100%","--height":"48px","--borderRadius":"50px","--fontColor":"#fff","--fontSize":"16px","--fontWeight":"normal","--border":"none","--background":"linear-gradient(120deg, rgb(72, 225, 235, 1) -1%, rgb(72, 225, 235, 1) 100%)","--backgroundHover":"linear-gradient(120deg, rgb(72, 225, 235, 0.75) -1%, rgb(72, 225, 235, 0.75) 100%)","--fontColorHover":"#fff","--opacity":(null==(t=L.voiceStyle)?void 0:t.length)>0?1:"0.3"}},{default:v(()=>[x(l(f(ue)("create.done")),1)]),_:1},8,["renderStyle"])])])],2)]}),_:1},8,["title","visible"]))}},jn={class:"tts-editor"},Nn=["onClick"],Wn=["src","alt"],Yn={key:1,class:"tts-default-avatar-empty flex-center"},Gn={class:"ava-name olh"},Qn={key:2,class:"ava-change"},Kn={class:"content-wrap"},Xn=["data-placeholder","onPaste","onInput","onMouseup","onKeyup","onPointerover","onKeydown"],Jn={class:"title-row"},Zn={class:"voice-title"},ea=["onClick"],ta=["onClick"],oa={class:"desc"},ia=["onClick"],na=["onMousedown"],aa={class:"add-text"},la=5e3,ra={__name:"dialogue_editor",props:{},emits:["openAddVoiceReferenceDialog","addDialogue","addVoice"],setup(n,{expose:r,emit:s}){var p;const v=null==(p=_())?void 0:p.appContext.config.globalProperties,{$$t:y,$$language:k,$$tValue:S}=(null==v?void 0:v.$i18n)??{},T=E(),I=c({addVoiceReferenceDialogVisible:!1,voiceStyle:""}),L=s,P=d(null),M=()=>V().length,V=e=>W.value.reduce((e,t)=>e+function(e){let t="";function o(e){if(e.nodeType===Node.TEXT_NODE?t+=e.nodeValue:("BR"===e.nodeName||"DIV"===e.tagName&&(1===e.childNodes.length&&"BR"===e.childNodes[0].tagName||e.childNodes.length>0))&&(t+="\n"),e.childNodes&&(1!==e.childNodes.length||"BR"!==e.childNodes[0].tagName))for(let t=0;t<e.childNodes.length;t++)o(e.childNodes[t])}for(let i=0;i<(null==e?void 0:e.childNodes.length);i++)o(e.childNodes[i]);return t}(t),"");const D=()=>{z.charCount=M()};function R(e=""){const t=document.createElement("div");return t.innerHTML=e,t.querySelectorAll("span").forEach(e=>{""===e.textContent.replace(/\u00A0/g,"").trim()&&e.remove()}),t.innerHTML}function F(e){if(!e)return;const t=e.innerHTML.trim();"<br>"!==t&&"<br/>"!==t&&"<br />"!==t?(t.endsWith("<br>")||t.endsWith("<br/>")||t.endsWith("<br />"))&&(e.innerHTML=t.replace(/<br\s*\/?>$/i,"")):e.innerHTML=""}function U(e){if(!e)return!0;if((e.innerText||"").length>0)return!1;return""===e.innerHTML.replace(/<br\s*\/?>/gi,"").replace(/&nbsp;/gi," ").trim()}const O=d({idx:"",range:"",selectedText:""}),z=Q(),q=d(-1),H=d(!1),j=d({}),N=d({show:!1,desc:"",x:0,y:0,idx:-1}),W=d([]);function Y(e){var t;(_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties.logCustomEvent("voice_style_complete_click"),I.addVoiceReferenceDialogVisible=!1;const o=O.value;if(!o)return;const{idx:i,range:n,selectedText:a,el:l}=o;if(l)return l.setAttribute("data-desc",e),N.value.desc=e,z.updateDialogueContent(i,W.value[i].innerHTML),void(O.value=null);const r=document.createElement("span");r.className="desc-highlight",r.setAttribute("data-desc",e),r.textContent=a,n.deleteContents(),n.insertNode(r),z.updateDialogueContent(i,W.value[i].innerHTML),window.getSelection().removeAllRanges(),O.value=null}w(()=>z.dialogues.length,()=>C(D));const G=e=>{var t;(_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties.logCustomEvent("voice_pop_show",{source:"from_select_addspeaker"});const o=W.value[e],i=window.getSelection();if(!o||!i||0===i.rangeCount||i.isCollapsed)return;const n=i.getRangeAt(0),{beforeHTML:a,middleHTML:l,afterHTML:r}=function(e,t,o=!0){var i,n,a;const l=document.createRange();l.selectNodeContents(e),l.setEnd(t.startContainer,t.startOffset);let r=K(l.cloneContents());const s=t.startContainer.parentElement;if(o&&"SPAN"===(null==s?void 0:s.tagName)&&(null==(i=null==s?void 0:s.classList)?void 0:i.contains("desc-highlight"))&&t.startOffset>=0){const e=document.createElement("div");e.innerHTML=r;const t=e.querySelectorAll("span.desc-highlight"),o=t[t.length-1];o.parentNode.replaceChild(document.createTextNode(o.textContent),o),r=e.innerHTML}const d=document.createRange();d.selectNodeContents(e),d.setStart(t.endContainer,t.endOffset);let c=K(d.cloneContents());const u=t.endContainer.parentElement;if(o&&"SPAN"===(null==u?void 0:u.tagName)&&(null==(n=null==u?void 0:u.classList)?void 0:n.contains("desc-highlight"))&&t.endOffset<=((null==(a=u.textContent)?void 0:a.length)||0)){const e=document.createElement("div");e.innerHTML=c;const t=e.querySelectorAll("span.desc-highlight")[0];t.parentNode.replaceChild(document.createTextNode(t.textContent),t),c=e.innerHTML}const p=t.cloneContents(),g=document.createElement("div");g.appendChild(p);const v=g.innerHTML.replace(/<(?!br\s*\/?>)[^>]*>/gi,"");return{beforeHTML:r,middleHTML:v,afterHTML:c}}(o,n);L("addVoice",{idx:e,type:"split",beforeHTML:a,middleHTML:l,afterHTML:r}),P.value={idx:e,beforeHTML:a,middleHTML:l,afterHTML:r},H.value=!1,i.removeAllRanges()};function K(e){try{const t=document.createElement("div");return t.appendChild(e),t.innerHTML}catch(t){const o=document.createElement("div");return o.appendChild(e.cloneNode(!0)),o.innerHTML}}function X(){L("addDialogue",-1)}function J(e,t){const o=t.target;if(!o)return;F(o);let i=M();if(i>la){const e=i-la,t=o.innerText||"",n=t.slice(0,t.length-e);o.innerText=n,function(e){const t=document.createRange();t.selectNodeContents(e),t.collapse(!1);const o=window.getSelection();null==o||o.removeAllRanges(),null==o||o.addRange(t)}
1(o)}!function(e){e.querySelectorAll("font").forEach(e=>{for(var t;e.firstChild;)null==(t=e.parentNode)||t.insertBefore(e.firstChild,e);e.remove()}),e.querySelectorAll("*").forEach(e=>{["style","color","face","size"].forEach(t=>e.removeAttribute(t))})}(o),ae(o),N.value.show=!1,z.updateDialogueContent(e,t.target.innerHTML),D()}function ee(e,t){N.value.show=!1,setTimeout(()=>{var t;const o=window.getSelection();if(!o||0===o.rangeCount||o.isCollapsed)return void(H.value=!1);(_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties.logCustomEvent("voice_style_show"),q.value=e,H.value=!0;const i=o.getRangeAt(0).getBoundingClientRect();let n;if(i.width>0)n=i.left+i.width/2;else{const e=o.getRangeAt(0).getBoundingClientRect();n=e.left+e.width/2}const a=n-100,l=window.innerWidth-200-10,r=Math.max(10,Math.min(l,a));j.value={position:"fixed",top:i.top-40+"px",left:r+"px"},o.getRangeAt(0);const s=W.value[e];s&&s.querySelectorAll(".desc-highlight")},0)}function te(e,t){return e&&1===e.nodeType&&e.closest(t)}function oe(e){if(e){const t=e.relatedTarget;if(te(t,".desc-bubble")||te(t,".desc-highlight"))return}N.value.show=!1}const ie=d(null);function ne(e){ie.value=e}u(()=>{Z.on("clear-dialogue-dom",()=>{W.value.forEach(e=>{e&&(e.innerHTML="")}),le()}),C(()=>{W.value.forEach((e,t)=>{var o;e&&(e.innerHTML=(null==(o=z.dialogues[t])?void 0:o.content)||""),ae(e)})}),C(D)}),w(()=>T.isLogin,e=>{e||W.value.forEach(e=>{e&&(e.innerHTML=""),ae(e)})});const ae=e=>{e&&(F(e),U(e)?e.classList.add("editable-empty"):e.classList.remove("editable-empty"))};function le(){H.value=!1}return A(()=>{Z.off("clear-dialogue-dom")}),r({hidePopup:le,showVoiceReference:function(){I.addVoiceReferenceDialogVisible=!0},applyPendingSplit:function(e){const t=P.value;if(!t)return;let{idx:o,beforeHTML:i,middleHTML:n,afterHTML:a}=t;i=R(i),a=R(a);const l=[];i.trim()&&l.push({...z.dialogues[o],content:i}),n.trim()&&l.push({...z.dialogues[o],content:n,voice:e}),a.trim()&&l.push({...z.dialogues[o],content:a,voice:{}}),z.dialogues.splice(o,1,...l),C(()=>{l.forEach((e,t)=>{const i=W.value[o+t];i&&(i.innerHTML=e.content)});const e=o+(i.trim()?1:0),t=W.value[e];t&&t.focus(),W.value.forEach((e,t)=>{var o;e&&(e.innerHTML=(null==(o=z.dialogues[t])?void 0:o.content)||""),ae(e)})}),P.value=null}}),(n,r)=>(t(),e("div",jn,[(t(!0),e(o,null,i(f(z).dialogues,(o,i)=>{var n,s,d,c,u;return t(),e("div",{key:o.id||i,class:"dialogue-item"},[a("div",{class:"tts-avatar pointer",onClick:e=>{L("addDialogue",i)}},[(null==(n=null==o?void 0:o.voice)?void 0:n.id)?(t(),e("img",{key:0,class:"ava-img",src:f($)(null==(s=o.voice)?void 0:s.cover),alt:i.toString()},null,8,Wn)):(t(),e("div",Yn,[g(f(B),{name:"sys-user-add",size:"16",color:"#000"})])),a("div",Gn,l((null==(d=null==o?void 0:o.voice)?void 0:d.id)?null==(c=o.voice)?void 0:c.title:f(y)("tts.add_role")),1),(null==(u=null==o?void 0:o.voice)?void 0:u.id)?(t(),e("div",Qn)):b("",!0)],8,Nn),a("div",Kn,[a("div",{ref_for:!0,ref:e=>W.value[i]=e,class:"editable-content",contenteditable:"true","data-placeholder":f(y)("tts.enter_your_text_here"),onPaste:e=>function(e,t){var o;t.preventDefault();const i=W.value[e];if(!i)return;const n=window.getSelection();if(!n||0===n.rangeCount)return;const a=la-M();if(a<=0)return;let l=(null==(o=t.clipboardData)?void 0:o.getData("text/plain"))||"";if(!l)return;const r=n.getRangeAt(0);l=l.slice(0,a),n.removeAllRanges(),r.deleteContents();const s=l.split(/\r?\n/),d=[];d.push(document.createTextNode(s[0]));for(let p=1;p<s.length;p++)d.push(document.createElement("br")),d.push(document.createTextNode(s[p]));d.forEach(e=>
1{r.insertNode(e),r.setStartAfter(e)});const c=document.createRange();c.setStartBefore(d[0]);const u=d[d.length-1];u.nodeType===Node.TEXT_NODE?c.setEnd(u,u.length):c.setEndAfter(u),n.addRange(c),i.dispatchEvent(new Event("input",{bubbles:!0})),C(()=>{z.updateDialogueContent(e,i.innerHTML)})}(i,e),onInput:e=>J(i,e),onMouseup:e=>ee(i),onKeyup:e=>ee(i),onPointerover:e=>function(e,t){const o=t.target;if(!o.classList.contains("desc-highlight"))return;const i=o.getAttribute("data-desc")||"",n=o.getBoundingClientRect();N.value={show:!0,desc:i,x:0,y:0,idx:e,el:o},C(()=>{const e=ie.value;if(!e)return;const t=e.getBoundingClientRect();let o=n.left+n.width/2-t.width/2+window.scrollX,i=n.top-t.height-8+window.scrollY;o=Math.max(8+window.scrollX,Math.min(o,window.scrollX+innerWidth-t.width-8)),i=Math.max(8+window.scrollY,i),N.value.x=o,N.value.y=i})}(i,e),onPointerleave:r[0]||(r[0]=e=>function(e){const t=e.relatedTarget;te(t,".desc-bubble")||te(t,".desc-highlight")||oe()}(e)),onKeydown:e=>function(e,t){if(!function(e){return!!(e.ctrlKey||e.metaKey||e.altKey)||["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"].includes(e.code)}(t)&&M()>=la&&t.preventDefault(),"Backspace"!==t.key&&"Delete"!==t.key)return;const o=W.value[e];return o&&U(o)&&e>0?(t.preventDefault(),z.dialogues.splice(e,1),W.value.splice(e,1),void C(()=>{W.value[e-1]&&(W.value.forEach((e,t)=>{var o;e&&(e.innerHTML=(null==(o=z.dialogues[t])?void 0:o.content)||""),ae(e)}),C(()=>{const t=W.value[e-1];if(t){t.focus();const e=document.createRange();e.selectNodeContents(t),e.collapse(!1);const o=window.getSelection();null==o||o.removeAllRanges(),null==o||o.addRange(e)}}))})):void 0}(i,e)},null,40,Xn),N.value.show&&N.value.idx===i?(t(),e("div",{key:0,ref_for:!0,ref:ne,class:"desc-bubble",style:m({left:N.value.x+"px",top:N.value.y+"px"}),onMouseleave:r[1]||(r[1]=e=>N.value.show=!1),onPointerleave:oe},[a("div",Jn,[a("span",Zn,l(f(y)("tts.voice_style")),1),a("span",{class:"popup-icon icon-edit",onClick:e=>(e=>{const t=N.value.el;t&&(O.value={idx:e,el:t,range:null,selectedText:t.textContent},I.voiceStyle=t.getAttribute("data-desc")||"",I.addVoiceReferenceDialogVisible=!0)})(i)},null,8,ea),a("span",{class:"popup-icon icon-delete",onClick:e=>(e=>{const t=N.value.el;t&&(t.replaceWith(document.createTextNode(t.textContent||"")),z.updateDialogueContent(e,W.value[e].innerHTML),N.value.show=!1)})(i)},null,8,ta)]),a("div",oa,l(N.value.desc),1),r[4]||(r[4]=a("div",{class:"line"},null,-1)),a("div",{class:"add_speaker",onClick:e=>(e=>{var t;(_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties.logCustomEvent("voice_pop_show",{source:"from_popup_addspeaker"});const o=N.value.el;if(!o)return;const i=W.value[e];if(!i)return;const n=document.createRange();n.setStart(i,0),n.setEndBefore(o);const a=K(n.cloneContents()),l=o.outerHTML,r=document.createRange();r.setStartAfter(o),r.setEnd(i,i.childNodes.length);const s=K(r.cloneContents());L("addVoice",{idx:e,type:"split",beforeHTML:a,middleHTML:l,afterHTML:s}),P.value={idx:e,beforeHTML:a,middleHTML:l,afterHTML:s},N.value.show=!1})(i)},[r[3]||(r[3]=a("i",{class:"popup-icon icon-speaker"},null,-1)),x(l(f(y)("tts.add_a_new_speaker")),1)],8,ia)],36)):b("",!0)]),q.value===i&&H.value?(t(),e("div",{key:0,ref_for:!0,ref:"popupRef",class:"popup tts-popup-action",style:m(j.value)},[a("span",{class:"popup-btn",onMousedown:e=>G(i)},[r[5]||(r[5]=a("i",{class:"popup-icon icon-speaker"},null,-1)),x(l(f(y)("tts.add_a_new_speaker")),1)],40,na)],4)):b("",!0)])}),128)),a("div",null,[a("div",{class:"add-row",onClick:X},[r[6]||(r[6]=a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[a("path",{d:"M8.00016 3.33301V12.6663M3.3335 7.99967H12.6668",stroke:"white","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),a("div",aa,l(f(y)("tts.add_speaker")),1)])]),I.addVoiceReferenceDialogVisible?(t(),h(Hn,{key:0,visible:I.addVoiceReferenceDialogVisible,"onUpdate:visible":r[2]||(r[2]=e=>I.addVoiceReferenceDialogVisible=e),"voice-style":I.voiceStyle,onDone:Y},null,8,["visible","voice-style"])):b("",!0)]))}},sa={class:"tts-bottom-bar"},da={class:"tts-tip-box"},ca={class:"title"},ua={class:"content"},pa=["innerHTML"],ga={class:"tts-bottom-credits flex1"},va=ee({__name:"generate",emits:["generateSpeech"],setup(o,{emit:i}){var r;const s=E(),d=Q(),c=null==(r=_())?void 0:r.appContext.config.globalProperties,{$$t:u}=(null==c?void 0:c.$i18n)??{},p=i,m=k(()=>new Intl.NumberFormat("en-US").format(d.charCount??0)),h=k(()=>d.free_tts_duration?u("tts.free_speech_generation_time",{min:d.free_tts_duration??0}):se.appname===de?u("tts.credits_cn"):u("tts.credits_min",{num:20}
1)),b=async()=>{await s.checkLoginStatus({source:"speech"})&&p("generateSpeech")};return(o,i)=>{const r=Ce;return t(),e("div",sa,[g(r,{placement:"top","popper-class":"tts-tip-popover"},{content:v(()=>[a("div",da,[a("div",ca,l(f(u)("tts.we_support_10_languages")),1),a("div",ua,l(f(u)("tts.enteryour_text")),1),a("div",{class:"content",innerHTML:f(u)("tts.supported_languages")},null,8,pa)])]),default:v(()=>[i[0]||(i[0]=a("div",{class:"tts-issue flex-center"},[a("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALOSURBVHgB7ZqBceIwEEWXq8AluIOjg3MJdBA6SDoIHVw6IB0wqcBcBeQqEFcBdPBvNZKJspYMyCtwZvJmdkAz2pVWWknW2kTf3JcZKQCg4p+G5RdLzTJnqbxYjix7//vO8odlO5vNjnRPuOMNS8tyQB4blgXdGtsoi4EehmVJpeFGargRL8XOtkElYMOPGA4Vw/JiR9I7WgW6FcscbuZeMDx7to0n0oQNPg80uGZp6Eq8Q68Ddp9Jg4HOt1CYbj9br0WcSHRef4pdW0+Ih2ieE3AxLzEscyqEnw0Tafe6AfOGDpHO11SYhBOHq9qG287yDYwEboHLAWwvVV6OnkIF4NaE5PypHZm+NWXAeg9+FK29B8oA/UPTnFNYRLyuKa9xE9g4UAZw60HSDClsNEbf2zpcPHLDduQZ0aYqVhFvs7dMuLVkvCNLygTuiTfE2qtiFWX4ZI+aNuivy9Ni/hHUa4TeG00H2Zem+xM68FNU2tJ0eBfluvsTOiDjak/TYSvKp8EOHahFpT2NAArnQIC8O0cX8SdoJFA4B4S9aP9mYYVQgTMGozIWt7IXhtBRKFQ0ESJ9OfU16QDF4ux+1KK87/6EDsitqqHpUItydAb+iUrFbl4ZNKL8t1dD+1EitWtk2jKpR4mwUoX+LaihTLQcgLudSU7r8xRCPtEq18HYA0iDR1F+SyaF0X90tdSUARTuA4hfaBbnlIxQuOwy3bcz+j4Al/XDVQOB+LXyHpf6WF5qealyKxTtKN5sW0U8L7Uba8DgqyS2vKFYXqaoE3BbpoFWCLPiKmKsVHI39f5hRWNIOGFZQy+93ibaWJEGA050jly9wOHOnPWA3RVpgnT+vsOw/Ibbhm0sy1dMdqSXvo4ZsFMkRLuO2E7sUI4Wt8iC4+OU1cLgju+LN8jDhkqLEU+8Fu1PDazYnI0t1/T5U4PuaddenLY0hU8NvlHgP/H/HUrG/93cAAAAAElFTkSuQmCC",alt:""})],-1))]),_:1}),a("div",ga,l(h.value),1),g(Le,{class:"tts-ai-flag",margin:"0 12px 0 0px","text-align":"left"}),a("div",{class:n(["tts-max-text",{red:f(d).charCount>=5e3}])},l(m.value)+"/5,000 ",3),g(f(U),{class:"tts-generate-btn",type:"primary",size:"large",shape:"rectangular",loading:f(d).generateLoading,onClick:T(b,["stop"])},{default:v(()=>[x(l(f(u)("tts.generate_speech")),1)]),_:1},8,["loading"])])}}},[["__scopeId","data-v-46a7709b"]]),ma={class:"tts-header"},fa=ee({__name:"header",props:{modelValue:{type:String,default:""}},emits:["update:modelValue","tabClick"],setup(n,{emit:a}){var r;const s=null==(r=_())?void 0:r.appContext.config.globalProperties,{$$t:d}=null==s?void 0:s.$i18n,c=n,u=k(()=>[{label:d("tts.text_to_speech"),value:"tts"},{label:d("tts.voice_library"),value:"library"}]),p=a,m=k({get:()=>c.modelValue,set:e=>{p("update:modelValue",e),p("tabClick",e)}});return(n,a)=>(t(),e("div",ma,[g(f(oe),{modelValue:m.value,"onUpdate:modelValue":a[0]||(a[0]=e=>m.value=e),class:"tts-tabs",variant:"segment",appearance:"white"},{default:v(()=>[(t(!0),e(o,null,i(u.value,e=>
1(t(),h(f(te),{key:e.value,value:e.value},{default:v(()=>[x(l(e.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-81236da4"]]),ha={key:0,class:"loading-card"},ba={class:"speech-content"},ya={class:"prcess-desc"},_a={class:"process"},wa={class:"audio-card-wapper"},xa={class:"audio-item-box"},ka={class:"audio-item-player fn-inline pointer"},Ca={class:"audio-item-cover-op-bg flex-center"},Sa={class:"playing"},Ta={class:"title-box"},Aa={class:"title"},Ia={class:"title-text"},La={class:"tag"},Pa={class:"flex-row-center"},Ma={class:"time flex"},Va={key:0},Da={class:"icon-list"},$a={class:"error-list"},Ra=ee({__name:"audio_card",props:{data:{type:Object,default:()=>({})},state:{type:Number,default:0},index:{type:Number,default:0}},emits:["togglePlay","addCartSuccess","addCartFail","changeFavorite","changeSaleState","bugNoexclusive","handleReport","setPlayList","updateProgress"],setup(o,{emit:i}){var r,s,p;const y=Q(),k=ie(),C=null==(r=_())?void 0:r.appContext,S=ne();null==(s=_())||s.appContext.config.globalProperties;const I=o,L=e=>{if("number"!=typeof e||e<0)return"00:00";const t=Math.floor(e/1e3),o=Math.floor(t/3600),i=Math.floor(t%3600/60),n=t%60,a=e=>e.toString().padStart(2,"0");return o>0?`${a(o)}:${a(i)}:${a(n)}`:`${a(i)}:${a(n)}`},P=e=>{z.error({position:"top",content:e})},M=d(0),V=d(null),D=d(null),R=c({duration:((null==(p=I.data)?void 0:p.duration_milliseconds)??0)/1e3,isplay:!1,buffer:!1,progress:0,isCurPlay:!1});d(""),w(()=>I.data,e=>{var t;R.duration=(null==(t=I.data)?void 0:t.duration_milliseconds)/1e3,M.value=e.progress??0,2===e.state?(()=>{V.value&&(clearInterval(V.value),V.value=null);let e=M.value,t=3.5;V.value=setInterval(()=>{t=Math.max(.5,.96*t),e+=t,e>=99?(M.value=99,clearInterval(V.value),V.value=null):M.value=Math.floor(e),E("updateProgress",{_genId:I.data._genId,progress:M.value})},200)})():(V.value&&(clearInterval(V.value),V.value=null),M.value=100)},{immediate:!0,deep:!0});const E=i,F=e=>{R.duration=e},U=e=>{var t,o,i,n,a;if(R.isplay=e,R.isplay){(_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties.logCustomEvent("speech_play_click",{content_id:(null==(o=null==I?void 0:I.data)?void 0:o.id.toString())??"",song_url:null==(i=null==I?void 0:I.data)?void 0:i.mp3_url,duration:(null==(a=null==(n=R.duration)?void 0:n.toFixed(2))?void 0:a.toString())??""})}},B=e=>{R.buffer=e},O=e=>{R.progress=e},q=()=>{var e;E("togglePlay",I.data),null==(e=D.value)||e.changeOp()},H=()=>{var e,t,o,i;let n=0;const a=k.curPlayGroup;(null==a?void 0:a.startsWith("discover_"))?n=+a.split("_")[2]:(null==a?void 0:a.startsWith("playlistDetail"))&&(n=S.feed_id);const l=null==(o=null==(t=(_()||(null==(e=null==window?void 0:window.$getVueCurrentInstance)?void 0:e.call(window))).appContext)?void 0:t.config)?void 0:o.globalProperties;null==l||l.logCustomEvent("playmode",{type:"order"}),le.doPlayStateReport({song_id:null==(i=null==I?void 0:I.data)?void 0:i.song_id,play_type:2,playlist_id:n??0}).then(e=>{})},j=()=>{var e,t,o,i,n;R.isCurPlay=(null==(i=null==(o=null==(t=null==(e=null==C?void 0:C.config)?void 0:e.globalProperties)?void 0:t.$globalMediaUtils)?void 0:o.globalAudioPlayer)?void 0:i.currentUrl)==$(null==(n=I.data)?void 0:n.mp3_url)};return u(()=>{var e,t,o,i;null==(i=null==(o=null==(t=null==(e=null==C?void 0:C.config)?void 0:e.globalProperties)?void 0:t.$globalMediaUtils)?void 0:o.globalAudioPlayer)||i.registGlobalListener("curPlayUrlChange",j)}),A(()=>{var e,t,o,i;null==(i=null==(o=null==(t=null==(e=null==C?void 0:C.config)?void 0:e.globalProperties)?void 0:t.$globalMediaUtils)?void 0:o.globalAudioPlayer)||i.releaseGlobalListener("curPlayUrlChange",j)}),(i,r)=>{const s=fe;return 2===I.state?(t(),e("div",ha,[r[4]||(r[4]=a("div",{class:"head-img"},[a("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABUCAYAAAAcaxDBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAe1SURBVHic7Z1riFVVFMd/q6aazHAq06EirAxMg8ZoojRIUSQlgiB7IFEhZX0IipIK+tCHoIICISIigiIkKT9EREUkjlAWGWmQZvQaREtzzAnLV2OrD3vf6c65Z927z+POPefe+YE4c84+++z9Zz/WXnudPTBBrkirC9AIVe0D5gPnAr8BR4ERYBD4XkSGWle6EqGqk1X1LW3MQVXdoqovq+ptqtrbynIXooWqajdwPjAdmAqcBdwPXJMyy2+Bd4E3ROTHXAoZSEsEVdWTgBnApcDFOCGr6QVW5fS6L4DXceIezSlPk3EVVFXPA+YCc4BJdZJeDSzN+fVDwEvAGhEZzjnvUcZFUFWdDcwDLgh8pBmCVhgGngdeaEaLbaqgqnoZsAg3LiYhzy5v8SPwoIh8lGemTRHUz7TLgAszZHMLbmhoNuuBe/MaBnIVVFW7gAU4uzFp3n8Ae4C9uPHuH+AZ4NYci2gxCCwXka+yZpSboKp6DnA7zgAP4QTwC7AD+ElE/jTy7QOuww0b04Fu//NM/68rW8lHGQGeFJHnsmSSi6CqegWui58WkHwY2AJsE5G/M763C7gc1yuuBxYDk7PkCawBVovISJqHMwuqqgtxlWnEAWAA+FZENOt7jbJ0AzcCK/z/aVvveuCONKJmElRVl+FMnHocBjYBW0Tk3
1yzvS4KfGB/HWQvdKbL4BFiaVNTUgqrqTcCVDZJtBz4Ukb/SvicrXtingJUkb7GJW2oqQQNa5nHg4zxmzbxQ1auAl4GrEj66RkQeDk2cWNCAMXMYWCsi+5Pm3Wz8JPY08FjCR1eLyPMhCRMJ6mfzm+sk+R14U0QOJcl3vFHVG4B3CLcIRoBrQ3pcsKDezrwP2zT6FSfmkdA8W4mqzgI24pa5IQwCcxutqE4KfHkXzmi3xKy0zFKICSAiO4FrgZ2Bj8wAXm2UKEhQnOFsrYCGKZmYFURkEOfV2hv4yC1+uDBpKKg3O+Ybt4/jJqBCj5n18KIuBEJNuxf9AiKWkBa6DHus/biIs3lSfPdfHph8JvCIdbOuoN6fabngthfJzsyK94uGOkYeVdWeuBuNWugi4/ph4MPAl5eJJ4GQRtIDPBR3wxTUb1tYnvZNrVxONgu/xHwAZ3c2YlXcWFqvhc4zrh/Aud/aEj+MvRaQtBe4O3oxVlC/O2ltqA2Mp9eoRTyFi1BpxIroBauFzjWuD+OCCNoaEdkLvBKQ9DpVnVl9oUZQH4RgbY5taZZzuIA8S9hYelf1L3EtdAbxQQgngG2Ji1VSfCt9PyDpjdW/xAl6qfHgL1n3gErI2oA0fao6ag3FCXqx8eCOVEUqN+8TtiRdXPlhjKDerooGblX4KX25yokP1fkkIOmowz3aQs83HvjD2jfvADYFpBndVokKarXOPamLU34GAtKMmk5RQa2lZqi/sB0Jsbt7KhNTVNCzjAc6No7dr+9DvPqzoFbQM43EnTp+VggJK58BtYKebiRuO89SQkJ6aBfUCmptwjU9Nr3ghNS/G2oFjQ1VSRuJ1kbsC0jTC+G7np1OSJcfglpBY1ui35fvZD4NTRMV9JiROE04YNsgItuAt+skWevT1AhqBStkjQpuB57AhWdG+Rz31R9QOwkdIn61NIXOXi0BnIKLF/2U/7fWdwGfV29YRgU9CFwUk9lU4PsmFLJMVBraXsY2roPViaJd3prNWvqFb0GwNBijWVRQy96y3HqdhKXBGM2iglpuurNVdUrmIpUUX/ezjdtjNBsjqPdQW630kuxFKy1W3fdFP8CNWyn9bDw8O1ORyo1V9xqt4gT9wXj4IlU9I3WRSoqvc5zlAzFaxQk6iIuui3Iy0Je6ZOWlD1f3KIdxWo2hRlAftxS3IgDoV9VCnFMyHvi69hu3t8fFeFnepq3G9R7cx6qdwuW4OscRq1GsoCLyK7DbyGiBj39qa3wdFxi3d3uNaqgnzGbj+jnY3aCd6MfVNQ5LG1tQEdmBvRS9XlXb1gPl62Z9fjnktYmlUdfdYFyfRPNOrSkCS7GPQbI0ARoIKiLf4VxUcczxX/i2Fb5OVnzsLq+JScjk8gFgBdkuUdXQM0YKj6/LEus2Tou6NBTUB55+Ztw+FVihqlaARGnwdViBq1Mcn3kt6hJq/gwA1hdzPcCdqmoFSRQeX/Y7sW3O/YQFjYUJ6vfl12Fv4k2jpKJWiTnNSHIMWBcamxBsoIvIAeqPIecB95Sp+/uy3oMru8UHvu5BJFrxiMg31A9AnQasLMNE5cu4Ertlgvti8Jsk+XbMIS7VeNNoCfYEBPCliDSc1aO0/TFD1fgV0FIaH1L4tYi8l+YdbXsQVjXe0dGPW07WOwgWUrbMCm11VFsU78+snI1nOTqq2SQiG7O8s9SHCdYpzxk4T3s/tm1ZzTHcbJ5oAoqj8MddJnj/FNzu5GzcHlDctkUc+3F2ZrBpVI8iH8j6Jy4U/WjFqPb5d+OC16bgwmN6cUEI1r65WVzcknogz4DiIh8Z3Ex24bp47gFwRT3UulkMARsaueCyUNRj1/NmN7C5nqc9L4r6hwHy4DBuYbHV2lBrBkX90xVp2YcLj/kBGGzFQqIQQQvGH1c5E/ch2mn8Hxg8grMZj+CirQ/ixsV9wJ7x+FsfE0wwwQRV/AdS5Io+xRGy+AAAAABJRU5ErkJggg==",alt:""})],-1)),a("div",ba,[a("div",ya,[a("div",null,l(f(ue)("tts.generating_speech")),1),a("div",null,l(`${M.value}%`),1)]),a("div",_a,[a("div",{class:"process-line",style:m({width:M.value+"%"})},null,4),r[3]||(r[3]=a("div",{class:"process-behand"},null,-1))])])])):(t(),e("div",{key:1,class:n(["audio-card",R.isCurPlay?"song-card-active":"song-card-normal"])},[g(ke,{ref_key:"refPlayer",ref:D,class:"flex-row-center",url:`${f($)(o.data.mp3_url)}`,duration:R.duration,onSyncDuration:F,onSyncPlayState:U,onSyncLoadingState:B,onSyncProgress:O,onCurPlayEnded:H},{default:v(()=>{var i,d,c,u,p,m,w,k,C,S,A;return[a("div",wa,[a("div",xa,[a("div",ka,[a("div",{class:n(["audio-item-cover-op-box fn-inline pointer",{"isplay-true":R.isplay,"isplay-false":!R.isplay}])},[g(Se,{src:(null==(i=o.data)?void 0:i.cover)?f($)(null==(d=o.data)?void 0:d.cover):f(X),alt:"Default Cover of Ai Music Generator on Mureka.ai"},null,8,["src"]),a("div",{class:"audio-item-cover-op flex-center",onClick:T(q,["stop"])},[a("div",Ca,[r[5]||(r[5]=a("i",{class:"block play"},null,-1)),a("div",Sa,[g(s,{"bar-config":{barWidth:"3px",barHeight:"13px",barSpacing:"3px",barColor:"#fff"},animation:R.isplay},null,8,["animation"])])])])],2)]),a("div",Ta,[a("div",Aa,[a("span",Ia,l(null==(c=o.data)?void 0:c.title),1),2!=(null==(u=o.data)?void 0:u.audio_quality)||[4,5,6,8].includes(null==(p=o.data)?void 0:p.state)?b("",!0):(t(),h(f(ae),{key:0,class:"hq",variant:"outline"},{default:v(()=>[...r[6]||(r[6]=[x("HQ",-1)])]),_:1}))]),a("div",La,l(null==(m=o.data)?void 0:m.preview),1),a("div",Pa,[a("div",Ma,[[4,5,6,8].includes(null==(w=o.data)?void 0:w.state)?b("",!0):(t(),e("span",Va,l(L(null==(k=o.data)?void 0:k.duration_milliseconds)),1))]),g(Le,{margin:"0 0 0 8px","text-align":"left"})])]),a("div",Da,[[4,5,6,8].includes(null==(C=o.data)?void 0:C.state)?b("",!0):(t(),e("div",{key:0,class:"icon download",onClick:r[0]||(r[0]=e=>(e=>{var t,o;(_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties.logCustomEvent("speech_download_click",{content_id:null==(o=null==I?void 0:I.data)?void 0:o.id.toString()}),le.feedCardDownloadQuery({speech_id:null==e?void 0:e.id,t:7}).then(t=>{200==t.code?ce.downLoadAtag({useAlink:!0,href:$(t.data.oss_key),fileName:e.title.replace(/(\s+)|(\n+)/g,"_")+"."+ce.getFileExtension(t.data.oss_key)}).then(e=>{}).catch(e=>{P(ue("create.downloading_failed"))}):6314==t.code?P(ue("create.song_state_auditing")):6124===t.code?P(ue("create.only_vip_can_download")):6315==t.code?P(ue("create.song_state_auditing_failed_disabled")):6335==t.code?P(ue("editor.subscripe_level_not_met")):P(ue("create.downloading_failed"))}).catch(e=>{P(ue("create.downloading_failed"))})})(o.data))}))]),a("div",$a,[[4,5,6].includes(null==(S=o.data)?void 0:S.state)?(t(),e("div",{key:0,class:"err
1-item",onClick:r[1]||(r[1]=e=>{return t=o.data,void y.speechRetry(t);var t})},[r[7]||(r[7]=a("i",{class:"icon reload"},null,-1)),x(l(f(ue)("create.retry")),1)])):b("",!0),[4,5,6,8].includes(null==(A=o.data)?void 0:A.state)?(t(),e("div",{key:1,class:"err-item",onClick:r[2]||(r[2]=e=>{return t=o.data,void y.speechDelete(t);var t})},[r[8]||(r[8]=a("i",{class:"icon remove"},null,-1)),x(" "+l(f(ue)("create.delete")),1)])):b("",!0)])])])]}),_:1},8,["url","duration"])],2))}}},[["__scopeId","data-v-2f3b0c4f"]]),Ea={class:"speech-list height-all"},Fa={class:"speech-box height-all"},Ua={class:"my-speech"},Ba={class:"search"},Oa={class:"search-box"},za=["placeholder"],qa={class:"liked flex1"},Ha={key:0,class:"empty height-all"},ja={key:1,class:"list-box height-all"},Na=ee({__name:"speechlist",setup(n){var r;const s=E(),c=Q(),p=null==(r=_())?void 0:r.appContext.config.globalProperties,{$$t:g,$$language:m,$$tValue:y}=(null==p?void 0:p.$i18n)??{},x=d({size:20}),C=k(()=>{var e,t;return(null==(e=c.ttsList)?void 0:e.length)<=0&&!c.isLoading&&!c.loadError&&(null==(t=c.searchKeyword)?void 0:t.length)<=0}),S=e=>{c.loadMore(e,x.value)},T=d("");let A=null;const I=()=>{A&&clearTimeout(A),A=setTimeout(()=>{c.search(T.value)},400)},P=e=>{c.refresh(e,x.value)},V=(e,t)=>{c.togglePlay(e,t)},D=({_genId:e,progress:t})=>{const o=c.ttsList.find(t=>t._genId===e);o&&(o.progress=t)};return w(()=>s.isLogin,async e=>{e&&c.doRetry()}),u(()=>{s.isLogin&&c.doRetry()}),(n,r)=>(t(),e("div",Ea,[a("div",Fa,[a("div",Ua,l(f(g)("tts.my_speech")),1),a("div",Ba,[a("div",Oa,[r[6]||(r[6]=a("img",{class:"search-icon",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIhSURBVHgB7ZiBdYIwEIYPJ3AENigblA3sBnWDuolugBvwnAA6Ad0gdgLd4O/lkfeK8QAhIWrL9949X9Tc5Q+XkBzRzMz/JiJHAMT8sWJL2FK2pTHNme1orGQ7RFF0pEeAB75mKzCciu2d7gUHT9kU3FFBhXCwJdsW/tE+lzQlHCBG/ejbKNg+2JLmYIzo1PxWdPRXqNfSZINXLYGzIYGNr30wEWYGVUuwhEbSMSkVfKYT5Jzf+whiJicX/G/JB6i3SZucPAM5pVJyRXjEChPsFpDTVJELLbMf00Sg3r1sxr8jcL1lZjQxQioVNAbUO0Sw2XeNuxC+e7PaZYgDmIlRUvdYrpAEvFrtA4XDjvXS10ESEFvtLwpHabVTGgrn3cnKw2kPWpexl1bsU1+fSHCCiz8wFJCh8Rf05EgCzs1G6BSijrFI9Aqg60U9JfYJ99jXQRLwabVTCoct4LuvgyTA3jZXFA47VklDebajRJuzwnJ0j8NcRWOBfJwefYW8IZ40+24lFzzzhcY4ToVZ8Z5KkO/Ffgpe7GgnOM/h71KfCf535AsTRCpoKTjsTKivkAoyG/IJwhW2mvitmfaI0BSoy4d63dilxQT9pcUgIvRgdvCP9rlBCBFGiH5HKLij0ChgQX73TCOiEbDCcIq2QQUXYYLq9aFzPDeCmlfSk5npzPwnvsFfeBG++csiei/5D4Ugwv2MFBr87np6Pa1pZmbmgh93TO0rLhBp6wAAAABJRU5ErkJggg==",alt:""},null,-1)),L(a("input",{"onUpdate:modelValue":r[0]||(r[0]=e=>T.value=e),type:"text",name:"search-input",class:"search-input",autocomplete:"off",placeholder:f(g)("tts.search_voice"),onInput:I},null,40,za),[[M,T.value]])])]),a("div",qa,[C.value?(t(),e("div",Ha)):(t(),e("div",ja,[f(c).loadError?b("",!0):(t(),h(xe,{key:0,refreshing:f(c).refreshing,"onUpdate:refreshing":r[1]||(r[1]=e=>f(c).refreshing=e),"loading-more":f(c).loadingMore,"onUpdate:loadingMore":r[2]||(r[2]=e=>f(c).loadingMore=e),"is-loading":f(c).isLoading,"onUpdate:isLoading":r[3]||(r[3]=e=>f(c).isLoading=e),finished:f(c).finished,"onUpdate:finished":r[4]||(r[4]=e=>f(c).finished=e),datas:f(c).ttsList,"item-id-field":"id",onRefresh:P,onLoadMore:S},{customContent:v(()=>[(t(!0),e(o,null,i(f(c).ttsList,(e,o)=>(t(),h(Ra,{key:e._genId||e.id||o,state:null==e?void 0:e.state,data:e,index:o,onUpdateProgress:D,onTogglePlay:V},null,8,["state","data","index"]))),128))]),_:1},8,["refreshing","loading-more","is-loading","finished","datas"])),f(c).loadError?(t(),h(we,{key:1,onRetry:r[5]||(r[5]=()=>{c.doRetry()})})):b("",!0)]))])])]))}},[["__scopeId","data-v-52bcf298"]]),Wa={class:"tts-tbox"},Ya={class:"tts-titlebox"},Ga=["placeholder"],Qa=ee({__name:"titlebox",props:{modelValue:String},emits:["update:modelValue","closePopupManually"],setup(o,{emit:i}){var n;const l=null==(n=_())?void 0:n.appContext.config.globalProperties,{$$t:r}=null==l?void 0:l.$i18n,s=Q(),c=r("editor.title"),u=i,p=d(s.speechTitle);w(()=>s.speechTitle,e=>{p.value=e}),w(p,e=>{s.speechTitle=e});const g=()=>{u("closePopupManually")},v=()=>{O({content:r("tts.this_will_clear"),cancelLabel:r("mine.Cancel"),confirmLabel:r("common.confirm"),titleAlign:"left",close(){},confirm:e=>
1{e(),s.clearDialogues(),Z.emit("clear-dialogue-dom")},cancel:e=>{null==e||e()}})};return(o,i)=>(t(),e("div",Wa,[a("div",Ya,[L(a("input",{"onUpdate:modelValue":i[0]||(i[0]=e=>p.value=e),class:"tts-title-input",placeholder:f(c),autocomplete:"off",name:"tts-title-input",maxlength:"50",onInput:i[1]||(i[1]=e=>o.$emit("update:modelValue",p.value)),onKeydown:i[2]||(i[2]=V(T(()=>{},["prevent"]),["enter"])),onFocus:g},null,40,Ga),[[M,p.value]])]),f(s).dialogues&&f(s).dialogues.some(e=>""!==(e.content||"").replace(/<br\s*\/?>/gi,"").replace(/ /gi,"").trim())?(t(),e("div",{key:0,class:"clear pointer",onClick:v})):b("",!0)]))}},[["__scopeId","data-v-6ae8a6b7"]]),Ka={class:"generate height-all"},Xa={key:0,class:"tts-editor-box"},Ja={key:1,class:"tts-voice-library-box"},Za={class:"speech-box-out"},el=["innerHTML"],tl=["innerHTML"],ol={__name:"index",setup(o){var i;const l=null==(i=_())?void 0:i.appContext.config.globalProperties,{$$t:s}=(null==l?void 0:l.$i18n)??{};D({title:s("seo.speech_title"),meta:[{name:"description",content:s("seo.speech_desc")},{property:"og:title",content:"Mureka.ai Text to Speech Generator - AI Speech Generator"},{property:"og:description",content:"The best text to speech generator to transform your written content into natural-sounding audio."},{property:"og:type",content:"website"},{property:"og:url",content:"https://www.mureka.ai/speech/create"},{property:"og:image",content:"https://mureka.ai/favicon.png"},{property:"og:image:alt",content:"Mureka.ai AI Music Generator"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Mureka.ai Text to Speech Generator"},{name:"twitter:description",content:"The best text to speech generator to transform your written content into natural-sounding audio."},{name:"twitter:image",content:"https://mureka.ai/favicon.png"},{name:"twitter:image:alt",content:"Mureka.ai AI Music Generator"},{name:"twitter:site",content:"@mureka_ai"}],script:[{innerHTML:'\n[\n  {\n    "@context": "https://schema.org",\n    "@type": "WebPage",\n    "name": "Text to Speech Generator | Create Speech with Natural Voices | Mureka.ai",\n    "url": "https://www.mureka.ai/speech/create",\n    "description": "Convert your written content into natural-sounding audio with Mureka.ai’s text-to-speech tool. Choose your voice, add speaker roles, and generate speech instantly.",\n    "publisher": {\n      "@type": "Organization",\n      "name": "Mureka.ai",\n      "url": "https://www.mureka.ai",\n      "logo": {\n        "@type": "ImageObject",\n        "url": "https://www.mureka.ai/favicon.png",\n        "width": 600,\n        "height": 60\n      }\n    },\n    "mainEntity": {\n      "@type": "SoftwareApplication",\n      "name": "Mureka Text to Speech",\n      "applicationCategory": "MultimediaApplication",\n      "operatingSystem": "Web",\n      "description": "Mureka’s online speech generation tool: input text, select a voice or speaker role, and generate speech in your desired tone.",\n      "url": "https://www.mureka.ai/speech/create",\n      "featureList": [\n        "Enter or paste text for speech conversion",\n        "Select voice / speaker role",\n        "Preview speech output",\n        "Generate speech instantly",\n        "Supports multiple voices and roles"\n      ],\n      "offers": {\n        "@type": "Offer",\n        "url": "https://www.mureka.ai/speech/create",\n        "price": "8.00",\n        "priceCurrency": "USD",\n        "availability": "https://schema.org/InStock"\n      }\n    }\n  },\n  {\n    "@context": "https://schema.org",\n    "@type": "FAQPage",\n    "mainEntity": [\n      {\n        "@type": "Question",\n        "name": "Is your text to speech generator completely free to use?",\n        "acceptedAnswer": {\n          "@type": "Answer",\n          "text": "Yes, our text to speech online tool is free. There are no hidden charges or subscription fees. You can use it as much as you need without paying a dime."\n        }\n      },\n      {\n        "@type": "Question",\n        "name": "What file formats can I download my audio in?",\n        "acceptedA
1nswer": {\n          "@type": "Answer",\n          "text": "You can download your audio in MP3 or WAV formats. The MP3 files are high quality but small in size. This makes them easy to share and store."\n        }\n      },\n      {\n        "@type": "Question",\n        "name": "How realistic do the AI voices sound?",\n        "acceptedAnswer": {\n          "@type": "Answer",\n          "text": "Our AI voices sound very realistic. They have natural intonation and emotion, unlike older systems. They are almost indistinguishable from human voices."\n        }\n      },\n      {\n        "@type": "Question",\n        "name": "Can I use this tool for commercial projects?",\n        "acceptedAnswer": {\n          "@type": "Answer",\n          "text": "Absolutely! You can use our tool for any commercial project. It\'s great for voice overs, audio content, and professional narration."\n        }\n      },\n      {\n        "@type": "Question",\n        "name": "What languages and voice styles are available?",\n        "acceptedAnswer": {\n          "@type": "Answer",\n          "text": "We offer many languages and voice styles. You can choose the language and voice that fits your content best. Our voices are lifelike and varied."\n        }\n      }\n    ]\n  }\n]\n\n',type:"application/ld+json",tagPosition:"head"}]});const p=F(),v=E(),m=Q(),y=ie(),x=r(),k=c({addVoiceReferenceDialogVisible:!1,tabValue:"tts"}),C=d("common"),S=e=>{var t;(_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties.logCustomEvent("from_voice_library"),m.setTopVoice(e),k.tabValue="tts"},T=()=>{P("addSpeaker")};const A=d(null),I=()=>{var e;const t=(_()||(null==(e=null==window?void 0:window.$getVueCurrentInstance)?void 0:e.call(window))).appContext.config.globalProperties;m.dialogues.filter(e=>function(e=""){return e.replace(/<br\s*\/?>/gi,"").replace(/&nbsp;/gi,"").replace(/<[^>]*>/g,"")}(e.content)).some(e=>!e.voice||!e.voice.id)?(t.logCustomEvent("voice_pop_show",{source:"from_generate"}),P("generate")):m.generate()};function L(){A.value&&"function"==typeof A.value.hidePopup&&A.value.hidePopup()}const P=e=>{var t;if("common"==e){(_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties.logCustomEvent("voice_pop_show",{source:"from_avatar"})}C.value=e,k.addVoiceReferenceDialogVisible=!0},M=d(null),V=e=>{-1!=e?(M.value=e,P("common")):m.addDialogue({voice:{},content:""})},$=e=>{var t;if((_()||(null==(t=null==window?void 0:window.$getVueCurrentInstance)?void 0:t.call(window))).appContext.config.globalProperties.logCustomEvent("text_to_speech_show",{source:"from_text_to_speech"}),"addSpeaker"!==C.value)return"generate"===C.value?(m.dialogues.forEac
1h((t,o)=>{const i=t.voice;(!i||"object"==typeof i&&0===Object.keys(i).length)&&(m.dialogues[o]={...t,voice:e})}),void m.generate()):void(-1!=M.value?m.dialogues[M.value]={...m.dialogues[M.value],voice:e}:m.addDialogue({voice:e,content:""}));A.value.applyPendingSplit(e)};return w(()=>p.createRenderType,()=>{var e;(null==(e=y.curPlayGroup)?void 0:e.startsWith("tts_"))&&y.setCurPlayData(null),"mobile"==p.createRenderType&&x.push({name:"create"})}),u(()=>{var e;(_()||(null==(e=null==window?void 0:window.$getVueCurrentInstance)?void 0:e.call(window))).appContext.config.globalProperties.logCustomEvent("text_to_speech_show")}),(o,i)=>(t(),e("div",{class:n(["tts-index height-all",{[`tts-index--${f(p).createRenderType}`]:!0}])},[a("div",Ka,[g(fa,{modelValue:k.tabValue,"onUpdate:modelValue":i[0]||(i[0]=e=>k.tabValue=e)},null,8,["modelValue"]),"tts"==k.tabValue?(t(),e("div",Xa,[g(Qa,{onClosePopupManually:L}),g(ra,{ref_key:"dialogueEditorRef",ref:A,onAddDialogue:V,onAddVoice:T},null,512),g(va,{onGenerateSpeech:I})])):b("",!0),"library"==k.tabValue?(t(),e("div",Ja,[g(Fn,{"render-type":"index",onApply:S})])):b("",!0)]),a("div",Za,[g(Na)]),k.addVoiceReferenceDialogVisible?(t(),h(Un,{key:0,visible:k.addVoiceReferenceDialogVisible,"onUpdate:visible":i[1]||(i[1]=e=>k.addVoiceReferenceDialogVisible=e),onApply:$},null,8,["visible"])):b("",!0),a("div",{innerHTML:f('\n<div hidden aria-hidden="true">\n<p>\nGenerate lifelike vocals in the <a href="https://www.mureka.ai/speech/create" title="AI Speech Generator">AI Speech Generator</a> \nand explore the complete set of <a href="https://www.mureka.ai/tools/" title="AI Music Tools">Mureka AI Music Tools</a>,\nRap with the <a href="https://www.mureka.ai/tools/ai-rap-generator.html" title="AI Rap Generator">AI Rap Generator</a>, \nor freestyle using the <a href="https://www.mureka.ai/tools/ai-freestyle-generator.html" title="AI Freestyle Generator">AI Freestyle Generator</a>.\n</p>\n\n</div>\n\n')},null,8,el),"en"==f(v).appLanguage?(t(),e("div",{key:1,class:"seo-html",innerHTML:f('\n<div hidden aria-hidden="true">\n  \x3c!-- Content pending approval →\n<h2 class="text-2xl font-bold mt-1 text-text-100">Transform Your Written Content with Advanced Text-to-Speech Technology</h2>\n<p class="whitespace-normal break-words"><strong>Effortless audio content creation</strong> is now within everyone\'s reach. Mureka\'s cutting-edge <strong>text to speech generator</strong> revolutionizes how you <strong>convert written content</strong> into professional-grade audio. With our <strong>web app</strong>, you can bring your words to life using state-of-the-art <strong>AI voice generator</strong> technology that delivers <strong>studio-quality</strong> results.</p>\n<p class="whitespace-normal break-words">Whether you\'re a content creator developing <strong>videos podcasts</strong>, an educator crafting <strong>elearning</strong> materials, or a business professional managing <strong>brand management</strong>, our platform serves your needs. You can <strong>convert text to speech online</strong> using our <strong>completely free</strong> service. This <strong>free online text-to-speech</strong> solution ensures universal access to premium <strong>audio tools</strong> without financial barriers.</p>\n<p class="whitespace-normal break-words">Our <strong>text-to-speech technology</strong> produces <strong>ultra-realistic</strong> and <strong>natural-sounding</strong> results that captivate your audience. Perfect for enhancing <strong>accessibility</strong> or creating engaging multimedia content, this <strong>free tts tool</strong> proves invaluable across diverse industries including <strong>higher education</strong>, <strong>marketing</strong>, and <strong>customer service</strong>.</p>\n<p class="whitespace-normal break-words">This comprehensive guide reveals everything about our platform. Discover how <strong>free text to speech</strong> is transforming <strong>audio content</strong> creation in today\'s digital landscape, offering <strong>low-latency</strong> processing and <strong>high-quality audio</strong> output.</p>\n<h2 class="text-xl font-bold text-text-100 mt-1 -mb-0.5">Why Text-to-Speech Technology is Revolutionizing Content Creation</h2>\n<p class="whitespace-normal break-words">The digital content landscape has undergone dramatic transformation thanks to <strong>speech synthesis</strong> innovation. This revolutionary <strong>technology</strong> is reshaping how we produce <strong>audio content</strong> and <strong>generate ai voices</strong> for various applications. <strong>Advanced AI</strong>
1 systems now create <strong>speech with humanlike</strong> characteristics, making professional audio accessible to everyone.</p>\n<p class="whitespace-normal break-words">Gone are the days of requiring expensive recording studios or professional voice actors. This <strong>automation</strong> democratizes audio content creation, empowering small businesses, independent creators, and those with limited budgets to compete effectively.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">The Power of AI-Driven Voice Synthesis</h3>\n<p class="whitespace-normal break-words">Today\'s <strong>ai-generated voices</strong> represent a quantum leap from traditional <strong>synthetic voices</strong>. <strong>Deep learning</strong> algorithms analyze vast datasets of <strong>human speech</strong> to understand rhythm, <strong>pitch</strong>, <strong>emotion</strong>, and conversational nuances. This results in <strong>conversational ai</strong> that sounds genuinely authentic.</p>\n<p class="whitespace-normal break-words">These systems process millions of voice samples to understand context and <strong>pronunciation</strong> patterns. <strong>They intelligently pause and adjust tone based on textual content</strong>, creating <strong>speech using</strong> natural inflections that engage listeners effectively.</p>\n<p class="whitespace-normal break-words"><strong>AI voice generator</strong> technology now powers applications across <strong>customer service</strong>, <strong>education</strong>, and <strong>marketing</strong> sectors. The interaction quality often makes it impossible to distinguish between <strong>ai</strong> and human speakers.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">From Robotic to Human-Like: The Evolution of TTS</h3>\n<p class="whitespace-normal break-words">Early <strong>text-to-speech</strong> systems produced mechanical, monotonous output lacking the subtle variations that make human communication engaging and comprehensible.</p>\n<p class="whitespace-normal break-words">Over the past decade, <strong>voice synthesis</strong> has achieved remarkable breakthroughs. <strong>Modern ai voices can express emotions and maintain conversational flow</strong>, adapting speed and emphasis based on contextual requirements.</p>\n<p class="whitespace-normal break-words">This evolution timeline demonstrates the remarkable progress in voice technology:</p>\n<table class="bg-bg-100 min-w-full border-separate border-spacing-0 text-sm leading-[1.88888] whitespace-normal">\n<thead class="border-b-border-100/50 border-b-[0.5px] text-left">\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Era</strong></th>\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Voice Quality</strong></th>\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Key Characteristics</strong></th>\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Primary Limitations</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">1990s-2000s</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Basic Robotic</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Monotone delivery, rigid <strong>pronunciation</strong></td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Difficult comprehension, no <strong>emotion</strong></td>\n</tr>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">2000s-2010s</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Improved Clarity</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Enhanced <strong>pronunciation</strong>, basic <strong>intonation</strong></td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Still mechanical, limited naturalness</td>\n</tr>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">2010s-2020s</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Neural Networks</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Context awareness, emotional range</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Processing speed, <strong>accents</strong> variations</td>\n</tr>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">2020s-Present</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Human-Like AI</strong></td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Natural flow, perfect <strong>pronunciation</strong>, emotional intelligence</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Minimal - nearly indistinguishable from humans</td>\n</tr>\n</tbody>\n</table>\n<p class="whitespace-normal break-words">Contemporary <strong>speech synthesis</strong> technology produces completely <strong>natural-sounding</strong> voices. <em>These systems understand contextual requirements and adapt for different c
1ontent types</em>. The distinction between <strong>ai</strong> and <strong>human voices</strong> has virtually disappeared.</p>\n<p class="whitespace-normal break-words">This breakthrough enables creators to produce professional audio rapidly. Whether for <strong>education</strong>, <strong>marketing</strong>, or <strong>accessibility</strong> purposes, <strong>realistic ai voices</strong> make it achievable for everyone.</p>\n<h2 class="text-xl font-bold text-text-100 mt-1 -mb-0.5">Discover Our Free Text to Speech Generator\'s Key Advantages</h2>\n<p class="whitespace-normal break-words">Choosing our <strong>free text to speech online</strong> platform delivers three transformative benefits. These advantages enhance audio content creation while ensuring exceptional user experience through targeted solutions and superior quality.</p>\n<p class="whitespace-normal break-words">Our <strong>tool</strong> distinguishes itself by prioritizing user-valued features. <strong>Accessibility</strong>, speed, and affordability form the foundation of our offering. Let\'s explore how these benefits can revolutionize your content creation process.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Accessibility for People with Visual Impairments</h3>\n<p class="whitespace-normal break-words">We designed our <strong>text reader</strong> specifically for individuals facing <strong>visual impairments</strong> or reading challenges. It delivers clear <strong>read aloud</strong> functionality for any text content. People with dyslexia or visual disabilities find it exceptionally beneficial.</p>\n<p class="whitespace-normal break-words">The interface maintains simplicity and user-friendliness. <strong>Screen reader compatibility</strong> ensures universal accessibility. We\'re committed to inclusive design for all users.</p>\n<p class="whitespace-normal break-words">Educational institutions and healthcare facilities utilize our <strong>tool</strong> to support their communities. The <strong>natural language</strong> delivery makes information more comprehensible, transforming <strong>written content</strong> into engaging audio experiences.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Instant Audio Content Creation</h3>\n<p class="whitespace-normal break-words">Transform documents or articles into audio instantly. Our system processes content rapidly, maximizing your productivity. <strong>No waiting periods or complicated setup procedures</strong> impede your workflow.</p>\n<p class="whitespace-normal break-words">Content creators save significant time through our streamlined process. Text converts to audio immediately, enabling multiple file creation in the time required for single manual recording.</p>\n<p class="whitespace-normal break-words">Professionals leverage it for presentations and training materials. Speed becomes crucial under deadline pressure. <em>Efficiency meets quality</em> in every audio file we produce.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Zero Cost, Maximum Value</h3>\n<p class="whitespace-normal break-words">Our service remains free, ensuring everyone accesses premium <strong>text-to-speech</strong> capabilities without payment. <strong>No hidden fees or usage limits</strong> restrict your creativity. It represents the market\'s best free solution.</p>\n<p class="whitespace-normal break-words">Students, entrepreneurs, and creators receive full access without cost barr
1iers. Financial concerns don\'t limit opportunities. <strong>Educational</strong> and personal projects receive identical quality as commercial applications.</p>\n<p class="whitespace-normal break-words">We provide comprehensive features at no charge, unlike competitors requiring payment for premium functionality. This democratizes audio content creation for all users. You can experiment, learn, and create without financial constraints.</p>\n<h2 class="text-xl font-bold text-text-100 mt-1 -mb-0.5">Advanced Features for Professional-Quality Audio</h2>\n<p class="whitespace-normal break-words">Creating professional audio demands sophisticated capabilities. Our <strong>text to speech generator</strong> offers <strong>enterprise-level features</strong> rivaling expensive solutions used by major media companies.</p>\n<p class="whitespace-normal break-words">These features ensure your audio meets industry-leading standards. Perfect for business presentations or multimedia projects, our <strong>tool</strong> provides precise control you need. The result is <strong>studio-quality</strong> audio that engages listeners and amplifies your message.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Ultra-Realistic AI Voices and Multilingual Support</h3>\n<p class="whitespace-normal break-words">Our <strong>ultra-realistic ai voices</strong> sound remarkably human through advanced neural networks creating natural speech patterns. The <strong>technology</strong> analyzes context and meaning for appropriate <strong>intonation</strong> and emphasis.</p>\n<p class="whitespace-normal break-words"><strong>Multiple languages</strong> support spans over 50 languages and regional <strong>accents</strong>. It\'s ideal for global content creation and international audiences. Each language maintains authentic <strong>pronunciation</strong> and cultural speech characteristics.</p>\n<p class="whitespace-normal break-words">You can seamlessly switch between <strong>languages</strong> within the same project. This flexibility enables content creation for diverse markets without platform changes.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Multiple File Formats: MP3, WAV, and Audio Downloads</h3>\n<p class="whitespace-normal break-words">Choose from various <strong>file formats</strong> including <strong>MP3</strong> and <strong>WAV</strong>. <strong>MP3 files</strong> offer excellent compression while maintaining <strong>high-quality audio</strong>. <strong>WAV</strong> files provide uncompressed audio for professional <strong>editing</strong> and broadcasting requirements.</p>\n<p class="whitespace-normal break-words">When you <strong>download the audio</strong>, our system optimizes each format for intended use. The <strong>resulting mp3 file</strong> maintains manageable sizes for easy sharing and storage. <strong>WAV</strong> files preserve every detail for professional post-production work.</p>\n<p class="whitespace-normal break-words">The download process is <strong>instant</strong> and secure. You can <strong>download the resulting</strong> audio immediately after generation without waiting or registration requirements.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Customizable Voice Controls</h3>\n<p class="whitespace-normal break-words">Our extensive customizable voice controls enable fine-tuning your <strong>audio file</strong> output. These controls provide professional-level precision over final results. You can create exactly the sound envisioned for your project.</p>\n<p class="whitespace-normal break-words">The interface simplifies complex adjustments through intuitive design. <strong>Multiple accents</strong> and voice styles match different content types and audiences. Your <strong>preferred voice style</strong> can be saved for consistent <strong>branding</strong> across projects.</p>\n<h4 class="text-base font-bold text-text-100 mt-1">Adjusting Speaking Speed and Tone</h4>\n<p class="whitespace-normal break-words">You can <strong>adjust speaking</strong> speed to match audience preferences and content requirements. Slower speech works perfectly for <strong>educational</strong> content and <strong>accessibility</strong> needs. Faster delivery creates dynamic presentations and engaging <strong>marketing</strong> materials.</p>\n<p class="whitespace-normal break-words"><strong>Tone</strong> controls allow precise adjustment of vocal characteristics including <strong>pitch</strong> variation, emphasis patterns, and overall vocal personality. These adjustments ensure your content sounds professional and appropriate for intended use.</p>\n<h4 class="text-base font-bold text-text-100 mt-1">Adding Emotion and Natural Intonation</h4>\n<p class="whitespace-normal break-words">The <strong>tone and emotion</strong> controls transform flat text into engaging, <strong>humanlike</strong> speech. You can add excitement, concern, authority, or warmth matching your content\'s purpose. This emotional range makes audio more compelling and memorable.</p>\n<p class="whitespace-normal break-words">Natural <strong>intonation</strong> patterns create conversational audio experiences. The system understands punctuation, sentence structure, and context to apply appropriate vocal inflections. This generates listening experiences that feel genuinely human and professionally polished.</p>\n<h2 class="text-xl font-bold text-text-100 mt-1 -mb-0.5">How to Convert Text to Speech in Simple Steps</h2>\n<p class="whitespace-normal break-words">Our <strong>text-to-speech app</strong> features user-friendly operation requiring just three steps. You don\'t need technical expertise or expensive software to <strong>convert text to audio</strong> effectively. The entire process completes within minutes.</p>\n<p class="whitespace-normal break-words">
1Whether creating content for professional projects or personal use, our method delivers exceptional results consistently. Let\'s examine each step to help you <em>transform any text</em> into engaging audio content.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Paste Your Text and Choose Your Language</h3>\n<p class="whitespace-normal break-words">Getting started is effortless. Simply <strong>enter your text</strong> into our clean interface. Our system handles any content length, from brief phrases to <strong>extensive articles</strong>.</p>\n<p class="whitespace-normal break-words">The text area adapts to accommodate your content. You can type directly or copy-paste from documents, websites, or emails. Once your content is prepared, <strong>choose the language</strong> from our comprehensive selection.</p>\n<p class="whitespace-normal break-words">We support over 40 <strong>languages</strong> and regional dialects. Simply <strong>select a voice</strong> that matches your text requirements. This ensures your audio sounds authentic for your target audience.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Select from Multiple Voice Styles</h3>\n<p class="whitespace-normal break-words">Voice selection adds personality and professionalism to your audio content. Our extensive library features <strong>multiple voice</strong> options for different content types and audiences.</p>\n<p class="whitespace-normal break-words">Each voice style possesses unique characteristics. Professional voices excel for business content, while conversational tones suit <strong>educational</strong> materials. Warm, friendly voices perfect <strong>customer service</strong> applications.</p>\n<table class="bg-bg-100 min-w-full border-separate border-spacing-0 text-sm leading-[1.88888] whitespace-normal">\n<thead class="border-b-border-100/50 border-b-[0.5px] text-left">\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Voice Style</strong></th>\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Best For</strong></th>\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Tone Characteristics</strong></th>\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Recommended Use</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Professional</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Business Content</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Authoritative, Clear</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Presentations, Reports</td>\n</tr>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Conversational</strong></td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Educational</strong> Material</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Warm, Engaging</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Training, Tutorials</td>\n</tr>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Narrative</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Storytelling</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Expressive, Dynamic</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Audiobooks</strong>, <strong>Podcasts</strong></td>\n</tr>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Neutral</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">General Purpose</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Balanced, Versatile</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Announcements, Instructions</td>\n</tr>\n</tbody>\n</table>\n<p class="whitespace-normal break-words">Preview options enable testing different voices before selection. This ensures your chosen voice matches your content\'s mood and message perfectly.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Generate and Download Your Audio File</h3>\n<p class="whitespace-normal break-words">The final step transforms your text into professional audio rapidly. Click generate and our <strong>ai</strong> <strong>converts text into spoken audio</strong> within seconds using advanced algorithms.</p>\n<p class="whitespace-normal break-words">Processing speed remains consistent regardless of text length. Our system <strong>turns text into natural-sounding speech</strong>
1 with natural rhythm and emphasis patterns.</p>\n<p class="whitespace-normal break-words">Upon completion, <strong>download the audio</strong> immediately. Choose from formats like <strong>MP3</strong> and <strong>WAV</strong> to meet your specific requirements. Your <strong>high-quality audio</strong> is ready for deployment across any platform.</p>\n<p class="whitespace-normal break-words">The complete process requires no technical knowledge. Anyone can <strong>convert text</strong> into professional-grade audio using our streamlined, three-step system.</p>\n<h2 class="text-xl font-bold text-text-100 mt-1 -mb-0.5">Practical Applications Across Industries</h2>\n<p class="whitespace-normal break-words"><strong>Text to speech generators</strong> extend far beyond simple audio conversion, finding applications across numerous professional sectors. Modern <strong>technology</strong> transforms <strong>written text into spoken audio</strong> with exceptional accuracy, helping professionals create content more efficiently.</p>\n<p class="whitespace-normal break-words">These <strong>tools</strong> gain worldwide adoption due to affordability and ease of use. <em>Small businesses and large corporations</em> achieve <strong>high-quality audio</strong> without expensive equipment investments.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Video Content and Social Media</h3>\n<p class="whitespace-normal break-words"><strong>YouTube and TikTok</strong> creators extensively use <strong>text-to-speech</strong> for narration purposes. High posting frequency demands make automated voices invaluable resources.</p>\n<p class="whitespace-normal break-words">Social media managers leverage these <strong>tools</strong> for rapid <strong>video</strong> production without waiting for voice actors. <strong>Professional-quality audio</strong> becomes accessible to creators with limited budgets.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Podcasts, Audiobooks, and Voice Overs</h3>\n<p class="whitespace-normal break-words">The <strong>podcasts</strong> industry utilizes automated voices for script testing, enabling creators to evaluate script flow before professional recording sessions.</p>\n<p class="whitespace-normal break-words"><strong>Audiobooks</strong> benefit significantly from this <strong>technology</strong>. Publishers create preliminary versions for <strong>editing</strong> purposes. <strong>Voice overs</strong> for advertisements and <strong>videos</strong> become more affordable for independent creators.</p>\n<p class="whitespace-normal break-words">Free platforms expand quality audio accessibility, helping small businesses compete with larger enterprises effectively.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Educational Content and Training Materials</h3>\n<p class="whitespace-normal break-words">Schools <strong>convert written</strong> lessons into audio format for diverse student learning styles, enhancing <strong>accessibility</strong> and comprehension.</p>\n<p class="whitespace-normal break-words">Corporate training departments transform manuals into audio content. <em>Accessibility improvements</em> reach broader employee populations. This <strong>technology</strong> promotes inclusive learning environments.</p>\n<h3 class="text-lg font-bold text-text-100 mt-1 -mb-1.5">Commercial Use and Marketing Applications</h3>\n<p class="whitespace-normal break-words">Businesses deploy automated voices for <strong>customer service</strong> and product demonstrations, maintaining consistent <strong>brand</strong> voice across all audio content.</p>\n<p class="whitespace-normal break-words"><strong>Marketing</strong> departments utilize <strong>text-to-speech</strong> for cost-effective promotional content creation. Companies produce content in <strong>multiple languages</strong> without hiring numerous voice actors. This <strong>technology</strong> accelerates campaign launches and enables rapid testing.</p>\n<table class="bg-bg-100 min-w-full border-separate border-spacing-0 text-sm leading-[1.88888] whitespace-normal">\n<thead class="border-b-border-100/50 border-b-[0.5px] text-left">\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Industry Sector</strong></th>\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Primary Use Cases</strong></th>\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Key Benefits</strong></th>\n<th class="text-text-000 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Cost Savings</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Social Media</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Video</strong> narration, content creation</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">
1Consistent voice, rapid production</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Up to 80% vs studio recording</td>\n</tr>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Entertainment</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Podcasts</strong>, <strong>audiobooks</strong>, <strong>voice overs</strong></td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Quick prototyping, <strong>accessibility</strong></td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Up to 70% vs <strong>human voices</strong></td>\n</tr>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Education</strong></td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Training materials, <strong>accessibility</strong></td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Inclusive learning, scalability</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Up to 60% vs traditional methods</td>\n</tr>\n<tr class="[tbody&gt;&amp;]:odd:bg-bg-500/10">\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Business</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Marketing</strong>, <strong>customer service</strong></td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]"><strong>Brand</strong> consistency, <strong>multiple languages</strong> support</td>\n<td class="border-t-border-100/50 [&amp;:not(:first-child)]:-x-[hsla(var(--border-100) / 0.5)] border-t-[0.5px] px-2 [&amp;:not(:first-child)]:border-l-[0.5px]">Up to 75% vs professional services</td>\n</tr>\n</tbody>\n</table>\n<h2>Mureka AI: 2025 Subscription Plans and Features</h2>\n<p>Mureka offers two main subscription options tailored to creators’ needs. The Basic Music & Speech plan is $8 per month (billed annually at $96), providing up to 400 songs or 200 minutes of speech each month. Subscribers can download MP3s, create 48 topical tracks and unlimited personal albums, and enjoy commercial licensing and a priority queue, plus 10 concurrent jobs. However, advanced options like video export, region editing, audio uploads as references, and voice cloning are excluded. </p>\n<p> The Pro plan costs $24 per month (billed annually at $288) and dramatically expands access: it supports 1,600 songs or 800 minutes of speech monthly, MP3/WAV/instrumental/stem downloads, 120 topical tracks, advanced editing (including region and melody extension), reference audio uploads, and even allows any voice (including humming input) to be the singer. Pro users also get professional text-to-speech, high-quality output, and voice cloning for commercial projects, making it an all-in-one solution for advanced music and audio content creation.  </p>\n<h2 class="text-xl font-bold text-text-100 mt-1 -mb-0.5">Transform Your Written Content into Engaging Audio Today</h2>\n<p class="whitespace-normal break-words">Our <strong>text to speech online</strong> platform simplifies transforming <strong>written text</strong> into professional audio that connects with your audience effectively.</p>\n<p class="whitespace-normal break-words">The power of <strong>ai text to speech</strong> <strong>technology</strong> rests in your hands. You can <strong>convert written</strong> materials, <strong>long articles</strong>, PDF documents, or any <strong>written content</strong> into <strong>natural-sounding speech</strong> within minutes. Our <strong>free text to speech ai</strong> delivers <strong>lifelike</strong> audio that sounds authentic and engaging.</p>\n<p class="whitespace-normal break-words"><strong>Using ai voices</strong> provides complete control over your content schedule. You can create <strong>generated audio</strong> whenever needed, without expensive recording session costs. Our <strong>tool</strong> operates continuously, <strong>converting text into spoken audio</strong> using advanced algorithms.</p>\n<p class="whitespace-normal break-words">The <strong>realistic ai</strong> <strong>technology</strong> we offer transcends basic <strong>voice cloning</strong> capabilities. You access <strong>text to speech tools</strong> producing truly <strong>lifelike speech</strong> for any project. Whether for social media, <strong>educational</strong> materials, or business presentations, our <strong>ai voice generator</strong> handles everything.</p>\n<p class="whitespace-normal break-words">Ready to <strong>use the audio</strong>
1 capabilities that will distinguish your content? Begin converting your written materials today. Discover how <strong>online text-to-speech</strong> <strong>technology</strong> can expand your reach and improve <strong>accessibility</strong> for your audience.</p>\n<h2 class="text-xl font-bold text-text-100 mt-1 -mb-0.5">Frequently Asked Questions</h2>\n<p class="whitespace-normal break-words"><strong>Is your text to speech generator completely free to use?</strong></p>\n<p class="whitespace-normal break-words">Yes, our <strong>text to speech online</strong> <strong>tool</strong> remains completely free. No hidden charges or subscription fees exist. You can use it extensively without any payment requirements.</p>\n<p class="whitespace-normal break-words"><strong>What file formats can I download my audio in?</strong></p>\n<p class="whitespace-normal break-words">You can <strong>download the audio</strong> in <strong>MP3</strong> or <strong>WAV</strong> formats. <strong>MP3 files</strong> maintain high quality with compact sizes for easy sharing and storage.</p>\n<p class="whitespace-normal break-words"><strong>How realistic do the AI voices sound?</strong></p>\n<p class="whitespace-normal break-words">Our <strong>ai voices</strong> sound exceptionally realistic with natural <strong>intonation</strong> and <strong>emotion</strong>, unlike older systems. They\'re nearly indistinguishable from <strong>human voices</strong>.</p>\n<p class="whitespace-normal break-words"><strong>Can I use this tool for commercial purposes?</strong></p>\n<p class="whitespace-normal break-words">Absolutely! You can use our <strong>tool</strong> for any <strong>commercial purposes</strong>. It\'s perfect for <strong>voice overs</strong>, audio content, and professional narration applications.</p>\n<p class="whitespace-normal break-words"><strong>What languages and voice styles are available?</strong></p>\n<p class="whitespace-normal break-words">We offer numerous <strong>languages</strong> and voice styles. You can <strong>choose the language</strong> and voice matching your content requirements. Our voices are <strong>lifelike</strong> and diverse.</p>\n<p class="whitespace-normal break-words"><strong>How long can my text input be?</strong></p>\n<p class="whitespace-normal break-words">You can input text of any length. From short phrases to <strong>extensive articles</strong>, our system handles everything without length restrictions.</p>\n<p class="whitespace-normal break-words"><strong>Can I adjust the speaking speed and tone?</strong></p>\n<p class="whitespace-normal break-words">Yes, you can <strong>adjust the speaking</strong> speed and <strong>tone</strong> settings. This enables audio customization matching your specific needs. You can modify <strong>tone and emotion</strong> to achieve your desired listening experience.</p>\n<p class="whitespace-normal break-words"><strong>Is this tool suitable for people with visual impairments?</strong></p>\n<p class="whitespace-normal break-words">Yes, it\'s excellent for <strong>people with visual</strong> impairments. It <strong>reads text</strong> aloud clearly and naturally, significantly improving <strong>accessibility</strong>.</p>\n<p class="whitespace-normal break-words"><strong>How quickly can I generate audio from my text?</strong></p>\n<p class="whitespace-normal break-words">Our <strong>technology</strong> operates rapidly. Simply <strong>paste your text</strong>, <strong>choose a voice</strong> and options, then <strong>download audio</strong> within seconds. This saves considerable time.</p>\n<p class="whitespace-normal break-words"><strong>Can I use this for creating podcasts and audiobooks?</strong></p>\n<p class="whitespace-normal break-words">Yes, it\'s ideal for <strong>podcasts</strong> and <strong>audiobooks</strong> creation. The speech sounds natural and professional, perfect for transforming written content into engaging audio.</p>\n<p class="whitespace-normal break-words"><strong>What makes your tool different from services like ElevenLabs?</strong></p>\n<p class="whitespace-normal break-words">Our <strong>tool</strong> is free while offering <strong>realistic AI voices</strong> and professional features. Unlike <strong>ElevenLabs</strong>, we don\'t charge subscription fees. Our platform remains accessible to everyone.</p>\n<p class="whitespace-normal break-words"><strong>Can I use this for YouTube and TikTok content?</strong></p>\n<p class="whitespace-normal break-words">Absolutely! It\'s perfect for <strong>YouTube and TikTok</strong> creators. You can enhance <strong>
1videos</strong> with professional narration, maintaining consistent audio <strong>branding</strong> across content.</p>\n\n\n</div>\n\n')},null,8,tl)):b("",!0)],2))}};export{ol as default};

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.