Unrestricted Open-source alternative to AI video platforms — Free AI image & video generation studio with 600+ models (Flux, Midjourney, Kling, Sora, Veo). No content filters. Self-hosted, MIT licensed.
JavaScript ai-art-generatorai-image-generationai-video-generationfal-ai-alternativegenerative-aiimage-to-videoinvideo-alternativekling-ailipsynclitellm-alternativemidjourney-alternativemuapiopen-sourceopenrouter-alternativeseedance2sora-alternativetext-to-imagetext-to-videouncensoredwan-video
added audio studio
Jaya Prasad Kavurucda32080f834
diff --git a/components/StandaloneShell.js b/components/StandaloneShell.jsindex bb811a44..91b48709 100644--- a/components/StandaloneShell.js+++ b/components/StandaloneShell.js@@ -3,7 +3,7 @@import { useState, useEffect, useCallback } from 'react';import { useParams, useRouter } from 'next/navigation';import dynamic from 'next/dynamic';-import { ImageStudio, VideoStudio, LipSyncStudio, CinemaStudio, MarketingStudio, WorkflowStudio, AgentStudio, AppsStudio, getUserBalance } from 'studio';+import { ImageStudio, VideoStudio, LipSyncStudio, CinemaStudio, AudioStudio, MarketingStudio, WorkflowStudio, AgentStudio, AppsStudio, getUserBalance } from 'studio';const DesignAgentStudio = dynamic(() => import('studio').then(mod => mod.DesignAgentStudio), {ssr: false,@@ -15,6 +15,7 @@ import ApiKeyModal from './ApiKeyModal';const TABS = [{ id: 'image', label: 'Image Studio' },{ id: 'video', label: 'Video Studio' },+ { id: 'audio', label: 'Audio Studio' },{ id: 'lipsync', label: 'Lip Sync' },{ id: 'cinema', label: 'Cinema Studio' },{ id: 'marketing', label: 'Marketing Studio' },@@ -279,7 +280,7 @@ export default function StandaloneShell() {className={`relative py-4 text-[13px] font-medium transition-all whitespace-nowrap px-1 ${activeTab === tab.id? 'text-[#22d3ee]'- : 'text-white/50 hover:text-white'+ : 'text-white/70 hover:text-white'}`}>{tab.label}@@ -322,6 +323,7 @@ export default function StandaloneShell() {{activeTab === 'video' && <VideoStudio apiKey={apiKey} droppedFiles={droppedFiles} onFilesHandled={handleFilesHandled} />}{activeTab === 'lipsync' && <LipSyncStudio apiKey={apiKey} droppedFiles={droppedFiles} onFilesHandled={handleFilesHandled} />}{activeTab === 'cinema' && <CinemaStudio apiKey={apiKey} />}+ {activeTab === 'audio' && <AudioStudio apiKey={apiKey} droppedFiles={droppedFiles} onFilesHandled={handleFilesHandled} />}{activeTab === 'marketing' && <MarketingStudio apiKey={apiKey} droppedFiles={droppedFiles} onFilesHandled={handleFilesHandled} />}{activeTab === 'workflows' && <WorkflowStudio apiKey={apiKey} isHeaderVisible={isHeaderVisible} onToggleHeader={setIsHeaderVisible} />}{activeTab === 'agents' && <AgentStudio apiKey={apiKey} isHeaderVisible={isHeaderVisible} onToggleHeader={setIsHeaderVisible} />}diff --git a/packages/studio/src/components/AudioStudio.jsx b/packages/studio/src/components/AudioStudio.jsxnew file mode 100644index 00000000..74f2e303--- /dev/null+++ b/packages/studio/src/components/AudioStudio.jsx@@ -0,0 +1,1069 @@+"use client";++import { useState, useEffect, useRef, useCallback } from "react";+import { generateAudio, uploadFile } from "../muapi.js";+import { audioModels, getAudioModelById } from "../models.js";++// ---------------------------------------------------------------------------+// Upload button states+// ---------------------------------------------------------------------------+const UPLOAD_STATE = {+ IDLE: "idle",+ UPLOADING: "uploading",+ READY: "ready",+};++// ---------------------------------------------------------------------------+// SVG Icons+// ---------------------------------------------------------------------------+const PlayIcon = () => (+ <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor">+ <path d="M8 5v14l11-7z" />+ </svg>+);++const PauseIcon = () => (+ <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor">+ <path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z" />+ </svg>+);++const VolumeIcon = () => (+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">+ <polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5" />+ <path d="M15.54 8.46a5 5 0 0 1 0 7.07" />+ <path d="M19.07 4.93a10 10 0 0 1 0 14.14" />+ </svg>+);++const VolumeMuteIcon = () => (+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">+ <polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5" />+ <line x1="23" y1="9" x2="17" y2="15" />+ <line x1="17" y1="9" x2="23" y2="15" />+ </svg>+);++const MusicIcon = ({ className = "text-[#22d3ee]" }) => (+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className={className}>+ <path d="M9 18V5l12-2v13" />+ <circle cx="6" cy="18" r="3" />+ <circle cx="18" cy="16" r="3" />+ </svg>+);++const TrashIcon = () => (+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">+ <polyline points="3 6 5 6 21 6" />+ <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />+ <line x1="10" y1="11" x2="10" y2="17" />+ <line x1="14" y1="11" x2="14" y2="17" />+ </svg>+);++// ---------------------------------------------------------------------------+// Single File Uploader Component+// ---------------------------------------------------------------------------+function AudioFileUploader({ label, value, onChange, apiKey }) {+ const [uploadState, setUploadState] = useState(value ? UPLOAD_STATE.READY : UPLOAD_STATE.IDLE);+ const [progress, setProgress] = useState(0);+ const [fileName, setFileName] = useState(value ? value.split('/').pop().slice(-30) : "");+ const fileInputRef = useRef(null);++ useEffect(() => {+ if (!value) {+ setUploadState(UPLOAD_STATE.IDLE);+ setFileName("");+ setProgress(0);+ } else if (uploadState !== UPLOAD_STATE.READY) {+ setUploadState(UPLOAD_STATE.READY);+ setFileName(value.split('/').pop().slice(-30));+ }+ }, [value]);++ const handleUpload = async (e) => {+ const file = e.target.files?.[0];+ if (!file) return;++ if (file.size > 20 * 1024 * 1024) {+ alert("Audio file exceeds 20MB limit.");+ return;+ }++ setUploadState(UPLOAD_STATE.UPLOADING);+ setProgress(0);++ try {+ const url = await uploadFile(apiKey, file, (pct) => {+ setProgress(pct);+ });+ setFileName(file.name);+ setUploadState(UPLOAD_STATE.READY);+ onChange(url);+ } catch (err) {+ setUploadState(UPLOAD_STATE.IDLE);+ alert(`Upload failed: ${err.message}`);+ } finally {+ setProgress(0);+ }+ };++ const clearFile = (e) => {+ e.stopPropagation();+ onChange(null);+ };++ return (+ <div className="space-y-2">+ <div className="flex items-center justify-between">+ <label className="text-xs font-bold text-zinc-200 uppercase tracking-wider">+ {label}+ </label>+ {uploadState === UPLOAD_STATE.READY && (+ <button+ type="button"+ onClick={clearFile}+ className="text-xs font-bold text-red-400 hover:text-red-300 transition-colors uppercase tracking-wider flex items-center gap-1.5"+ >+ <TrashIcon /> Clear+ </button>+ )}+ </div>++ <div+ onClick={() => uploadState === UPLOAD_STATE.IDLE && fileInputRef.current?.click()}+ className={`relative border rounded p-4 transition-all duration-300 flex items-center gap-3.5 cursor-pointer ${+ uploadState === UPLOAD_STATE.READY+ ? "border-primary/60 bg-primary/10 shadow-[0_0_15px_rgba(34,211,238,0.05)]"+ : "border-zinc-700 bg-zinc-900 hover:bg-zinc-850 hover:border-primary/50"+ }`}+ >+ <input+ ref={fileInputRef}+ type="file"+ accept="audio/*"+ className="hidden"+ onChange={handleUpload}+ />++ {uploadState === UPLOAD_STATE.IDLE && (+ <>+ <div className="w-10 h-10 rounded bg-zinc-800 flex items-center justify-center text-zinc-200 border border-zinc-700/50">+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">+ <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"/>+ </svg>+ </div>+ <div className="text-left">+ <div className="text-xs font-bold text-white">Upload audio track</div>+ <div className="text-[11px] text-zinc-300 font-medium mt-0.5">MP3, WAV, M4A up to 20MB</div>+ </div>+ </>+ )}++ {uploadState === UPLOAD_STATE.UPLOADING && (+ <div className="w-full flex items-center gap-4">+ <div className="flex-1">+ <div className="flex justify-between text-xs text-white/95 mb-1.5 font-bold">+ <span>Uploading...</span>+ <span>{progress}%</span>+ </div>+ <div className="h-1.5 bg-zinc-800 rounded-full overflow-hidden">+ <div className="h-full bg-primary transition-all duration-300" style={{ width: `${progress}%` }} />+ </div>+ </div>+ </div>+ )}++ {uploadState === UPLOAD_STATE.READY && (+ <>+ <div className="w-10 h-10 rounded bg-primary/20 flex items-center justify-center text-primary border border-primary/30">+ <MusicIcon className="text-primary" />+ </div>+ <div className="text-left flex-1 min-w-0">+ <div className="text-xs font-bold text-white truncate">{fileName}</div>+ <div className="text-[11px] text-primary font-bold mt-0.5">Ready to generate</div>+ </div>+ </>+ )}+ </div>+ </div>+ );+}++// ---------------------------------------------------------------------------+// Multiple File Uploader Component (for array fields like audios_list)+// ---------------------------------------------------------------------------+function AudioListUploader({ label, value = [], onChange, apiKey, maxItems = 2 }) {+ const handleItemChange = (index, url) => {+ const newItems = [...value];+ if (url) {+ newItems[index] = url;+ } else {+ newItems.splice(index, 1);+ }+ onChange(newItems.filter(Boolean));+ };++ return (+ <div className="space-y-4">+ <label className="block text-xs font-bold text-zinc-200 uppercase tracking-wider">+ {label} (Max {maxItems})+ </label>+ <div className="space-y-3">+ {Array.from({ length: maxItems }).map((_, i) => (+ <AudioFileUploader+ key={i}+ label={`Track #${i + 1}`}+ value={value[i] || null}+ onChange={(url) => handleItemChange(i, url)}+ apiKey={apiKey}+ />+ ))}+ </div>+ </div>+ );+}++// ---------------------------------------------------------------------------+// Premium Custom Audio Player with Waveform Animation+// ---------------------------------------------------------------------------+function PremiumAudioPlayer({ url, title }) {+ const [isPlaying, setIsPlaying] = useState(false);+ const [currentTime, setCurrentTime] = useState(0);+ const [duration, setDuration] = useState(0);+ const [volume, setVolume] = useState(1);+ const [isMuted, setIsMuted] = useState(false);+ const audioRef = useRef(null);+ const progressBarRef = useRef(null);+ const visualizerIntervalRef = useRef(null);+ const [visualizerHeights, setVisualizerHeights] = useState(Array(18).fill(15));++ // Reset player when URL changes+ useEffect(() => {+ setIsPlaying(false);+ setCurrentTime(0);+ setDuration(0);+ if (audioRef.current) {+ audioRef.current.load();+ }+ }, [url]);++ // Audio state event listeners+ const onTimeUpdate = () => {+ if (audioRef.current) {+ setCurrentTime(audioRef.current.currentTime);+ }+ };++ const onLoadedMetadata = () => {+ if (audioRef.current) {+ setDuration(audioRef.current.duration);+ }+ };++ const onAudioEnded = () => {+ setIsPlaying(false);+ setCurrentTime(0);+ };++ // Toggle playback+ const togglePlay = () => {+ if (!audioRef.current) return;+ if (isPlaying) {+ audioRef.current.pause();+ setIsPlaying(false);+ } else {+ audioRef.current.play().then(() => {+ setIsPlaying(true);+ }).catch(err => {+ console.error("Audio playback error:", err);+ });+ }+ };++ // Equalizer visualizer effect+ useEffect(() => {+ if (isPlaying) {+ visualizerIntervalRef.current = setInterval(() => {+ setVisualizerHeights(+ Array(18).fill(0).map(() => Math.floor(Math.random() * 32) + 6)+ );+ }, 100);+ } else {+ if (visualizerIntervalRef.current) {+ clearInterval(visualizerIntervalRef.current);+ }+ setVisualizerHeights(Array(18).fill(12));+ }+ return () => {+ if (visualizerIntervalRef.current) clearInterval(visualizerIntervalRef.current);+ };+ }, [isPlaying]);++ // Volume control+ const handleVolumeChange = (e) => {+ const val = parseFloat(e.target.value);+ setVolume(val);+ if (audioRef.current) {+ audioRef.current.volume = val;+ }+ if (val === 0) {+ setIsMuted(true);+ } else {+ setIsMuted(false);+ }+ };++ const toggleMute = () => {+ if (!audioRef.current) return;+ if (isMuted) {+ audioRef.current.volume = volume;+ setIsMuted(false);+ } else {+ audioRef.current.volume = 0;+ setIsMuted(true);+ }+ };++ // Scrubbing+ const handleScrub = (e) => {+ if (!audioRef.current || duration === 0) return;+ const rect = progressBarRef.current.getBoundingClientRect();+ const pos = (e.clientX - rect.left) / rect.width;+ const seekTime = Math.min(Math.max(pos * duration, 0), duration);+ audioRef.current.currentTime = seekTime;+ setCurrentTime(seekTime);+ };++ // Helper formatting time+ const formatTime = (time) => {+ if (isNaN(time)) return "0:00";+ const minutes = Math.floor(time / 60);+ const seconds = Math.floor(time % 60);+ return `${minutes}:${seconds < 10 ? "0" : ""}${seconds}`;+ };++ const downloadAudio = async () => {+ try {+ const response = await fetch(url);+ const blob = await response.blob();+ const blobUrl = URL.createObjectURL(blob);+ const a = document.createElement("a");+ a.href = blobUrl;+ a.download = title ? `${title.replace(/\s+/g, '_')}.mp3` : "generated_audio.mp3";+ document.body.appendChild(a);+ a.click();+ document.body.removeChild(a);+ URL.revokeObjectURL(blobUrl);+ } catch {+ window.open(url, "_blank");+ }+ };++ return (+ <div className="w-full bg-zinc-900 border border-zinc-700/80 rounded p-6 shadow-3xl space-y-6 backdrop-blur-md">+ <audio+ ref={audioRef}+ src={url}+ onTimeUpdate={onTimeUpdate}+ onLoadedMetadata={onLoadedMetadata}+ onEnded={onAudioEnded}+ preload="auto"+ />++ {/* Visualizer and Track Details */}+ <div className="flex flex-col items-center justify-center py-6 relative rounded bg-black/60 overflow-hidden border border-zinc-800">+ <div className="flex items-center gap-1.5 h-12 mb-4 justify-center">+ {visualizerHeights.map((h, i) => (+ <div+ key={i}+ className="w-1.5 rounded-full bg-gradient-to-t from-primary to-[#a855f7] transition-all duration-100"+ style={{ height: `${h}px` }}+ />+ ))}+ </div>+ <div className="text-center px-4 max-w-full relative z-10">+ <span className="text-xs font-black text-primary uppercase tracking-[0.2em] block mb-1">+ Now Playing+ </span>+ <p className="text-white font-bold text-base truncate max-w-xs">{title || "Generated Track"}</p>+ </div>+ </div>++ {/* Controls & Progress bar */}+ <div className="space-y-4">+ {/* Progress bar */}+ <div className="flex items-center gap-3">+ <span className="text-xs font-bold text-zinc-200 w-10 text-right">+ {formatTime(currentTime)}+ </span>++ <div+ ref={progressBarRef}+ onClick={handleScrub}+ className="flex-1 h-2 bg-zinc-700 hover:bg-zinc-650 rounded-full cursor-pointer relative group transition-colors"+ >+ <div+ className="absolute left-0 top-0 bottom-0 bg-primary rounded-full group-hover:bg-primary/95 transition-all"+ style={{ width: `${(currentTime / (duration || 1)) * 100}%` }}+ />+ <div+ className="absolute w-3.5 h-3.5 bg-white rounded-full -top-[3px] shadow-glow opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none"+ style={{ left: `calc(${(currentTime / (duration || 1)) * 100}% - 7px)` }}+ />+ </div>++ <span className="text-xs font-bold text-zinc-200 w-10 text-left">+ {formatTime(duration)}+ </span>+ </div>++ {/* Buttons */}+ <div className="flex items-center justify-between pt-2">+ {/* Volume Control */}+ <div className="flex items-center gap-2 group/volume w-24">+ <button+ onClick={toggleMute}+ className="p-2 bg-zinc-800/80 border border-zinc-700 hover:bg-zinc-700 rounded text-zinc-200 hover:text-white transition-all"+ title="Mute/Unmute"+ type="button"+ >+ {isMuted ? <VolumeMuteIcon /> : <VolumeIcon />}+ </button>+ <input+ type="range"+ min="0"+ max="1"+ step="0.05"+ value={isMuted ? 0 : volume}+ onChange={handleVolumeChange}+ className="w-16 h-1 bg-zinc-700 rounded appearance-none cursor-pointer accent-primary hover:bg-zinc-600 transition-all opacity-0 group-hover/volume:opacity-100"+ />+ </div>++ {/* Main Play/Pause Button */}+ <button+ onClick={togglePlay}+ className="w-12 h-12 bg-primary hover:bg-white text-black rounded-full flex items-center justify-center hover:scale-105 active:scale-95 transition-all shadow-glow"+ title={isPlaying ? "Pause" : "Play"}+ type="button"+ >+ {isPlaying ? <PauseIcon /> : <PlayIcon />}+ </button>++ {/* Download Button */}+ <button+ onClick={downloadAudio}+ className="px-4 py-2 bg-zinc-800/80 hover:bg-zinc-700 border border-zinc-700 rounded text-xs font-bold text-white flex items-center gap-2 hover:border-primary/45 transition-all"+ title="Download Audio"+ type="button"+ >+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">+ <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3" />+ </svg>+ <span>Save</span>+ </button>+ </div>+ </div>+ </div>+ );+}++// ---------------------------------------------------------------------------+// Main Audio Studio Component+// ---------------------------------------------------------------------------+export default function AudioStudio({+ apiKey,+ onGenerationComplete,+ historyItems,+ droppedFiles,+ onFilesHandled,+}) {+ const PERSIST_KEY = "hg_audio_studio_persistent";++ // ── Mode & model state ──────────────────────────────────────────────────+ const [selectedModelId, setSelectedModelId] = useState(audioModels[0]?.id ?? "");+ const [params, setParams] = useState({});+ const [openDropdown, setOpenDropdown] = useState(false);+ const modelBtnRef = useRef(null);++ // ── Generation state ──────────────────────────────────────────────────+ const [isGenerating, setIsGenerating] = useState(false);+ const [generateError, setGenerateError] = useState(null);+ const [activeResultUrl, setActiveResultUrl] = useState(null);+ const [activeResultTitle, setActiveResultTitle] = useState("");+ const [view, setView] = useState("input"); // 'input' | 'result'++ // ── History state ────────────────────────────────────────────────────+ const [internalHistory, setInternalHistory] = useState([]);+ const history = historyItems ?? internalHistory;+ const [activeHistoryIdx, setActiveHistoryIdx] = useState(0);++ const selectedModel = getAudioModelById(selectedModelId);++ // ── Initialize params when model changes ──────────────────────────────+ useEffect(() => {+ if (!selectedModel) return;+ const initial = {};+ Object.entries(selectedModel.inputs || {}).forEach(([key, schema]) => {+ // Don't overwrite parameters like vocal upload, list etc. if they are already in state+ if (params[key] !== undefined) {+ initial[key] = params[key];+ } else {+ initial[key] = schema.default !== undefined ? schema.default : "";+ }+ });+ setParams(initial);+ }, [selectedModelId]); // Only reset when model ID changes++ // ── Persistence: Load ────────────────────────────────────────────────────+ useEffect(() => {+ try {+ const stored = localStorage.getItem(PERSIST_KEY);+ if (stored) {+ const data = JSON.parse(stored);+ if (data.selectedModelId) setSelectedModelId(data.selectedModelId);+ if (data.params) setParams(data.params);+ if (data.internalHistory) setInternalHistory(data.internalHistory);+ if (data.activeResultUrl) setActiveResultUrl(data.activeResultUrl);+ if (data.activeResultTitle) setActiveResultTitle(data.activeResultTitle);+ if (data.view) setView(data.view);+ }+ } catch (err) {+ console.warn("Failed to load AudioStudio persistence:", err);+ }+ }, []);++ // ── Persistence: Save ────────────────────────────────────────────────────+ useEffect(() => {+ const timer = setTimeout(() => {+ try {+ const state = {+ selectedModelId,+ params,+ internalHistory,+ activeResultUrl,+ activeResultTitle,+ view,+ };+ localStorage.setItem(PERSIST_KEY, JSON.stringify(state));+ } catch (err) {+ console.warn("Failed to save AudioStudio persistence:", err);+ }+ }, 500);+ return () => clearTimeout(timer);+ }, [selectedModelId, params, internalHistory, activeResultUrl, activeResultTitle, view]);++ // ── Handle Dropped Files ────────────────────────────────────────────────+ useEffect(() => {+ if (droppedFiles && droppedFiles.length > 0) {+ const audioFiles = droppedFiles.filter(f => f.type.startsWith('audio/'));+ if (audioFiles.length > 0 && selectedModel) {+ // Find the first audio input field in the current model+ const firstAudioField = Object.entries(selectedModel.inputs || {}).find(+ ([_, schema]) => schema.field === 'audio'+ );+ const firstAudioListField = Object.entries(selectedModel.inputs || {}).find(+ ([_, schema]) => schema.field === 'audios_list'+ );++ if (firstAudioField) {+ const [key] = firstAudioField;+ // Trigger file upload helper+ uploadFile(apiKey, audioFiles[0], () => {})+ .then(url => {+ setParams(prev => ({ ...prev, [key]: url }));+ })+ .catch(err => alert(`Failed to upload dropped file: ${err.message}`));+ } else if (firstAudioListField) {+ const [key] = firstAudioListField;+ uploadFile(apiKey, audioFiles[0], () => {})+ .then(url => {+ setParams(prev => {+ const currentList = Array.isArray(prev[key]) ? [...prev[key]] : [];+ if (currentList.length < 2) currentList.push(url);+ return { ...prev, [key]: currentList };+ });+ })+ .catch(err => alert(`Failed to upload dropped file: ${err.message}`));+ }+ }+ onFilesHandled?.();+ }+ }, [droppedFiles, onFilesHandled, selectedModel, apiKey]);++ // ── History helpers ─────────────────────────────────────────────────────+ const addToInternalHistory = useCallback((entry) => {+ setInternalHistory((prev) => [entry, ...prev].slice(0, 30));+ }, []);++ const handleSelectHistory = (entry, index) => {+ setActiveResultUrl(entry.url);+ setActiveResultTitle(entry.title || entry.prompt || "Generated Track");+ setActiveHistoryIdx(index);+ setView("result");+ };++ const handleGenerate = async () => {+ if (!selectedModel) return;++ // Check required fields+ if (selectedModel.required) {+ for (const field of selectedModel.required) {+ if (!params[field] || (Array.isArray(params[field]) && params[field].length === 0)) {+ alert(`Please complete the required field: ${selectedModel.inputs?.[field]?.title || field}`);+ return;+ }+ }+ }++ setIsGenerating(true);+ setGenerateError(null);++ try {+ const audioParams = {+ model: selectedModelId,+ ...params,+ };++ // Call generateAudio+ const res = await generateAudio(apiKey, audioParams);++ if (!res?.url) {+ throw new Error("No audio URL returned by the API.");+ }++ const title = params.title || params.prompt || `Generated ${selectedModel.name}`;+ const entry = {+ id: res.id || Date.now().toString(),+ url: res.url,+ title,+ prompt: params.prompt || "",+ model: selectedModelId,+ timestamp: new Date().toISOString(),+ };++ if (!historyItems) addToInternalHistory(entry);++ setActiveResultUrl(res.url);+ setActiveResultTitle(title);+ setView("result");+ setActiveHistoryIdx(0);++ if (onGenerationComplete) {+ onGenerationComplete({+ url: res.url,+ model: selectedModelId,+ prompt: params.prompt,+ type: "audio",+ });+ }+ } catch (e) {+ console.error("[AudioStudio]", e);+ setGenerateError(e.message?.slice(0, 100) ?? "Audio generation failed");+ } finally {+ setIsGenerating(false);+ }+ };++ const handleNew = () => {+ setView("input");+ setActiveResultUrl(null);+ setActiveResultTitle("");+ // Keep parameters to avoid having to reupload files if they wish to adjust details+ };++ return (+ <div className="w-full h-full flex bg-app-bg text-white overflow-hidden relative">++ {/* ─── LEFT CONFIGURATION SIDEBAR ─── */}+ <div className="w-full lg:w-[400px] border-r border-zinc-900 flex flex-col bg-zinc-950/40 backdrop-blur-lg flex-shrink-0 z-30">+ <div className="p-6 overflow-y-auto flex-1 custom-scrollbar space-y-6 pb-24">++ {/* Model Selector */}+ <div className="space-y-2 relative">+ <label className="text-xs font-bold text-zinc-300 uppercase tracking-wider block">+ Audio Model+ </label>+ <button+ ref={modelBtnRef}+ type="button"+ onClick={() => setOpenDropdown(!openDropdown)}+ className="w-full bg-zinc-900 border border-zinc-700 rounded px-4 py-3.5 text-sm text-left font-bold text-white flex items-center justify-between hover:bg-zinc-850 hover:border-primary/50 transition-all"+ >+ <span>{selectedModel?.name ?? "Select Model"}</span>+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" className={`transition-transform duration-200 ${openDropdown ? 'rotate-180' : ''}`}>+ <polyline points="6 9 12 15 18 9" />+ </svg>+ </button>++ {openDropdown && (+ <div className="absolute left-0 right-0 mt-2 z-50 bg-[#161618] border border-zinc-700 rounded shadow-3xl max-h-60 overflow-y-auto custom-scrollbar p-1.5">+ {audioModels.map((model) => (+ <button+ key={model.id}+ type="button"+ onClick={() => {+ setSelectedModelId(model.id);+ setOpenDropdown(false);+ }}+ className={`w-full text-left px-4 py-2.5 rounded text-xs font-bold transition-all flex flex-col gap-1.5 border ${+ model.id === selectedModelId ? "text-primary bg-primary/10 border-primary/20" : "text-zinc-200 border-transparent hover:bg-zinc-900 hover:text-white"+ }`}+ >+ <span>{model.name}</span>+ {model.description && (+ <span className="text-[10px] text-zinc-300 truncate max-w-[320px] font-normal">+ {model.description}+ </span>+ )}+ </button>+ ))}+ </div>+ )}+ </div>++ {/* Model Description */}+ {selectedModel?.description && (+ <div className="">+ <span className="text-[10px] font-bold text-primary uppercase tracking-wider block mb-1.5">Description</span>+ <p className="text-zinc-400 text-xs leading-relaxed font-semibold">{selectedModel.description}</p>+ </div>+ )}++ {/* Dynamic Configuration Form */}+ <div className="space-y-5">+ {selectedModel && Object.entries(selectedModel.inputs || {}).map(([key, schema]) => {+ // Skip model switcher itself (if it's in schemas)+ if (key === 'model') return null;+ // Audio URL file upload (single)+ if (schema.type === "string" && schema.field === "audio") {+ return (+ <AudioFileUploader+ key={key}+ label={schema.title || key}+ value={params[key] || ""}+ onChange={(url) => setParams(prev => ({ ...prev, [key]: url }))}+ apiKey={apiKey}+ />+ );+ }+ // Audio URLs list file upload (multiple)+ if (schema.type === "array" && schema.field === "audios_list") {+ return (+ <AudioListUploader+ key={key}+ label={schema.title || key}+ value={params[key] || []}+ onChange={(urls) => setParams(prev => ({ ...prev, [key]: urls }))}+ apiKey={apiKey}+ maxItems={schema.maxItems || 2}+ />+ );+ }+ // Boolean Toggles+ if (schema.type === "boolean") {+ return (+ <div key={key} className="flex items-center justify-between bg-zinc-900 border border-zinc-700/80 rounded p-4 transition-all hover:border-zinc-600">+ <div className="flex-1 pr-4">+ <span className="block text-xs font-bold text-white tracking-tight">+ {schema.title || key}+ </span>+ {schema.description && (+ <span className="block text-[11px] text-zinc-300 leading-normal mt-1">+ {schema.description}+ </span>+ )}+ </div>+ <button+ type="button"+ onClick={() => setParams(prev => ({ ...prev, [key]: !prev[key] }))}+ className={`w-11 h-6 rounded-full p-1 transition-all duration-300 relative shrink-0 ${+ params[key] ? "bg-primary" : "bg-zinc-800"+ }`}+ >+ <div className={`w-4 h-4 rounded-full bg-black shadow-md transform transition-all duration-300 ${+ params[key] ? "translate-x-5 bg-white" : "translate-x-0"+ }`} />+ </button>+ </div>+ );+ }+ // Enum Dropdowns+ if (schema.enum) {+ return (+ <div key={key} className="space-y-2">+ <label className="block text-xs font-bold text-zinc-200 uppercase tracking-wider">+ {schema.title || key}+ </label>+ <select+ value={params[key] || ""}+ onChange={(e) => setParams(prev => ({ ...prev, [key]: e.target.value }))}+ className="w-full bg-zinc-900 border border-zinc-700 hover:border-zinc-600 rounded px-4 py-3 text-xs text-white focus:outline-none focus:border-primary transition-all cursor-pointer"+ >+ {schema.enum.map((opt) => (+ <option key={opt} value={opt} className="bg-zinc-900 text-white text-xs">+ {opt}+ </option>+ ))}+ </select>+ {schema.description && (+ <span className="block text-[11px] text-zinc-300 leading-normal">+ {schema.description}+ </span>+ )}+ </div>+ );+ }++ // Number Sliders & Ranges+ const isNumber = schema.type === "int" || schema.type === "integer" || schema.type === "float" || schema.type === "number";+ const hasMinMax = schema.minValue !== undefined && schema.maxValue !== undefined;+ if (isNumber && hasMinMax) {+ const step = schema.step || (schema.type === "float" ? 0.05 : 1);+ return (+ <div key={key} className="space-y-3 bg-zinc-900 border border-zinc-700/80 rounded p-4 transition-all hover:border-zinc-600">+ <div className="flex items-center justify-between text-xs font-bold">+ <span className="text-white tracking-tight">{schema.title || key}</span>+ <span className="text-primary font-mono bg-primary/10 px-2 py-0.5 rounded border border-primary/20">{params[key] !== undefined ? params[key] : schema.default}</span>+ </div>+ <div className="flex items-center gap-2">+ <span className="text-[10px] text-zinc-300 font-medium w-6 text-right">{schema.minValue}</span>+ <input+ type="range"+ min={schema.minValue}+ max={schema.maxValue}+ step={step}+ value={params[key] !== undefined ? params[key] : (schema.default || 0)}+ onChange={(e) => setParams(prev => ({ ...prev, [key]: parseFloat(e.target.value) }))}+ className="flex-1 h-1.5 bg-zinc-800 rounded-full appearance-none cursor-pointer accent-primary hover:bg-zinc-700 transition-all"+ />+ <span className="text-[10px] text-zinc-300 font-medium w-6 text-left">{schema.maxValue}</span>+ </div>+ {schema.description && (+ <span className="block text-[11px] text-zinc-300 leading-normal">+ {schema.description}+ </span>+ )}+ </div>+ );+ }++ // Prompt / Textarea Input+ if (key === "prompt") {+ return (+ <div key={key} className="space-y-2">+ <label className="block text-xs font-bold text-zinc-200 uppercase tracking-wider">+ {schema.title || "Lyrics / Prompt"}+ </label>+ <textarea+ value={params[key] || ""}+ onChange={(e) => setParams(prev => ({ ...prev, [key]: e.target.value }))}+ className="w-full bg-zinc-900 border border-zinc-700 focus:border-primary/85 rounded p-3 text-xs text-white placeholder:text-zinc-400 focus:outline-none transition-all min-h-[100px] resize-none leading-relaxed shadow-inner"+ placeholder={schema.description || "Enter what you want generated..."}+ />+ {schema.examples && Array.isArray(schema.examples) && (+ <div className="flex flex-wrap gap-1.5 mt-2">+ {schema.examples.map((ex, idx) => (+ <button+ key={idx}+ type="button"+ onClick={() => setParams(prev => ({ ...prev, [key]: ex }))}+ className="text-[11px] px-3 py-1 bg-zinc-800/80 border border-zinc-700 hover:bg-primary/20 hover:border-primary/45 hover:text-white rounded-full transition-all font-semibold text-zinc-100"+ >+ "{ex.slice(0, 35)}..."+ </button>+ ))}+ </div>+ )}+ </div>+ );+ }++ // Standard Text / Input fields+ return (+ <div key={key} className="space-y-2">+ <label className="block text-xs font-bold text-zinc-200 uppercase tracking-wider">+ {schema.title || key}+ </label>+ <input+ type={isNumber ? "number" : "text"}+ value={params[key] !== undefined ? params[key] : ""}+ placeholder={schema.placeholder || schema.description || `Enter ${key}...`}+ onChange={(e) => {+ const val = isNumber ? (e.target.value === "" ? "" : parseFloat(e.target.value)) : e.target.value;+ setParams(prev => ({ ...prev, [key]: val }));+ }}+ className="w-full bg-zinc-900 border border-zinc-700 hover:border-zinc-600 focus:border-primary/80 rounded px-4 py-3.5 text-xs text-white placeholder:text-zinc-400 focus:outline-none transition-all shadow-inner"+ />+ {schema.description && (+ <span className="block text-[11px] text-zinc-300 leading-normal">+ {schema.description}+ </span>+ )}+ </div>+ );+ })}+ </div>++ </div>++ {/* Dynamic Cost & Generate Section */}+ <div className="p-4 border-t border-zinc-900 bg-zinc-950/80 backdrop-blur-xl absolute bottom-0 left-0 w-full lg:w-[400px] z-40">+ <button+ type="button"+ onClick={handleGenerate}+ disabled={isGenerating || !selectedModel}+ className="w-full py-4 bg-primary text-black text-base font-bold rounded hover:bg-white transition-all transform hover:scale-[1.01] active:scale-95 disabled:opacity-50 disabled:grayscale shadow-glow flex items-center justify-center gap-3"+ >+ {isGenerating ? (+ <>+ <div className="w-4 h-4 border-2 border-black/20 border-t-black rounded-full animate-spin" />+ <span>Generating Audio...</span>+ </>+ ) : (+ <>+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3">+ <path d="M5 3l14 9-14 9V3z" />+ </svg>+ <span>Generate Track</span>+ </>+ )}+ </button>+ </div>+ </div>+ {/* ─── RIGHT CONTENT AREA ─── */}+ <div className="flex-1 flex flex-col min-w-0 h-full relative z-20">++ {/* Main Display panel */}+ <div className="flex-1 overflow-y-auto custom-scrollbar p-6 lg:p-10 flex flex-col justify-between">++ <div className="flex-1 flex items-center justify-center min-h-[400px] mb-8">++ {/* 1. Error Display */}+ {generateError && (+ <div className="w-full max-w-md p-6 bg-red-500/10 border border-red-500/20 rounded flex flex-col items-center gap-4 animate-shake">+ <div className="w-12 h-12 bg-red-500/20 rounded-full flex items-center justify-center text-red-500 border border-red-500/30 shadow-lg">+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">+ <circle cx="12" cy="12" r="10" />+ <line x1="12" y1="8" x2="12" y2="12" />+ <line x1="12" y1="16" x2="12.01" y2="16" />+ </svg>+ </div>+ <div className="text-center">+ <span className="text-xs font-black text-red-500 uppercase tracking-widest block mb-1">+ Generation Error+ </span>+ <p className="text-white font-medium text-sm leading-relaxed">+ {generateError}+ </p>+ </div>+ </div>+ )}++ {/* 2. Generating / Loading View */}+ {isGenerating && !generateError && (+ <div className="flex flex-col items-center gap-6 animate-fade-in">+ <div className="relative">+ <div className="w-24 h-24 border-[3px] border-zinc-800 border-t-primary rounded-full animate-spin shadow-glow" />+ <div className="absolute inset-0 flex items-center justify-center text-primary">+ <MusicIcon className="animate-pulse text-primary" />+ </div>+ </div>+ <div className="text-center space-y-2">+ <div className="text-xs font-black text-primary uppercase tracking-[0.3em] animate-pulse">+ Generating Soundtrack+ </div>+ <div className="text-sm text-zinc-200 font-bold">+ Rendering audio waveforms and vocals...+ </div>+ </div>+ </div>+ )}++ {/* 3. Empty State (no audio, not loading, no error) */}+ {view === "input" && !isGenerating && !generateError && (+ <div className="flex flex-col items-center gap-6 max-w-md text-center p-8 bg-zinc-900/40 border border-zinc-800 rounded backdrop-blur-sm relative group animate-fade-in-up">+ {/* Glow behind the icon */}+ <div className="absolute inset-0 bg-primary/5 blur-3xl rounded-full opacity-25 group-hover:opacity-40 transition-opacity duration-1000 pointer-events-none" />+ <div className="w-20 h-20 bg-zinc-900 border border-zinc-705 rounded flex items-center justify-center shadow-inner relative z-10 transition-transform duration-500 group-hover:scale-105">+ <MusicIcon className="text-primary w-8 h-8 filter drop-shadow-[0_0_8px_rgba(34,211,238,0.3)]" />+ </div>+ <div className="relative z-10">+ <h3 className="text-white font-black text-xl mb-3 tracking-tight">Audio Studio</h3>+ <p className="text-sm text-zinc-200 font-medium leading-relaxed px-4">+ Choose an AI music model, voice cloner, or sound generator. Modify variables on the left and craft your next high-fidelity track.+ </p>+ </div>+ </div>+ )}++ {/* 4. Active Result Player Display */}+ {view === "result" && activeResultUrl && !isGenerating && !generateError && (+ <div className="w-full max-w-2xl animate-fade-in-up space-y-4">+ <div className="flex items-center justify-between px-1">+ <button+ onClick={handleNew}+ className="text-xs font-bold text-zinc-200 hover:text-primary flex items-center gap-2 transition-all bg-zinc-905 border border-zinc-700 hover:border-primary/30 px-4 py-2 rounded-full"+ type="button"+ >+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">+ <line x1="19" y1="12" x2="5" y2="12" />+ <polyline points="12 19 5 12 12 5" />+ </svg>+ <span>New Generation</span>+ </button>+ <span className="text-[11px] font-bold text-green-400 px-3.5 py-1.5 bg-green-500/10 border border-green-500/20 rounded-full flex items-center gap-2">+ <div className="w-1.5 h-1.5 bg-green-400 rounded-full animate-pulse" /> Success+ </span>+ </div>+ <PremiumAudioPlayer url={activeResultUrl} title={activeResultTitle} />+ </div>+ )}++ </div>++ {/* ─── BOTTOM HISTORY FOOTER ─── */}+ {history.length > 0 && (+ <div className="border-t border-zinc-900 pt-6 w-full animate-fade-in-up">+ <h4 className="text-xs font-bold text-zinc-300 uppercase tracking-wider mb-4 px-1">+ Generation History ({history.length})+ </h4>+ <div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4">+ {history.map((entry, idx) => (+ <div+ key={entry.id || idx}+ onClick={() => handleSelectHistory(entry, idx)}+ className={`p-3.5 bg-zinc-900 border rounded cursor-pointer transition-all flex flex-col justify-between h-28 border-zinc-700/80 hover:bg-zinc-850 hover:border-zinc-500 ${+ activeResultUrl === entry.url && view === "result"+ ? "border-primary bg-primary/5 shadow-glow"+ : ""+ }`}+ >+ <div className="flex items-center gap-2">+ <div className={`w-8 h-8 rounded flex items-center justify-center flex-shrink-0 ${+ activeResultUrl === entry.url && view === "result" ? "bg-primary/20 text-primary" : "bg-zinc-800 text-zinc-200"+ }`}>+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">+ <polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5" />+ </svg>+ </div>+ <span className="text-[10px] font-bold text-primary uppercase tracking-wider truncate">+ {entry.model ? entry.model.split('-').slice(0, 2).join(' ') : 'Audio'}+ </span>+ </div>+ <p className="text-[11px] font-semibold text-white line-clamp-2 leading-tight">+ {entry.title || entry.prompt || "Untitled Audio"}+ </p>+ </div>+ ))}+ </div>+ </div>+ )}++ </div>++ </div>+ </div>+ );+}diff --git a/packages/studio/src/index.js b/packages/studio/src/index.jsindex 006500ed..4daaff6a 100644--- a/packages/studio/src/index.js+++ b/packages/studio/src/index.js@@ -4,6 +4,7 @@ export { default as ImageStudio } from './components/ImageStudio';export { default as VideoStudio } from './components/VideoStudio';export { default as LipSyncStudio } from './components/LipSyncStudio';export { default as CinemaStudio } from './components/CinemaStudio';+export { default as AudioStudio } from './components/AudioStudio';export { default as MarketingStudio } from './components/MarketingStudio';export { default as WorkflowStudio } from './components/WorkflowStudio';export { default as AgentStudio } from './components/AgentStudio';diff --git a/packages/studio/src/models.js b/packages/studio/src/models.jsindex 30127aa9..2caa6937 100644--- a/packages/studio/src/models.js+++ b/packages/studio/src/models.js@@ -8085,3 +8085,2362 @@ export const imageLipSyncModels = lipsyncModels.filter(m => m.category === 'imagexport const videoLipSyncModels = lipsyncModels.filter(m => m.category === 'video');export const getV2VModelById = (id) => v2vModels.find(m => m.id === id);+++// ── Audio Models ──────────────────────────────────────────────────────────+export const audioModels = [+ {+ "id": "suno-create-music",+ "name": "Suno Create Music",+ "endpoint": "suno-create-music",+ "family": "suno",+ "description": "Suno generate music that turns text prompts into full songs ΓÇö complete with vocals, lyrics, and instrumentation. You can describe a mood, genre, or even a specific lyric idea, and Suno creates a realistic, studio-quality track in seconds.",+ "required": [+ "style"+ ],+ "inputs": {+ "prompt": {+ "examples": [+ "Hard-hitting rap track with aggressive beat and confident male vocals about winning."+ ],+ "description": "A description of the desired audio content. The prompt will be strictly used as the lyrics and sung in the generated track",+ "type": "string",+ "title": "Prompt",+ "name": "prompt"+ },+ "style": {+ "examples": [+ "Classical"+ ],+ "description": "Music style specification for the generated audio.",+ "format": "text",+ "type": "string",+ "title": "Style",+ "name": "style",+ "placeholder": "Jazz, Classical, Electronic, Pop, Rock, Hip-hop, etc."+ },+ "model": {+ "enum": [+ "V3_5",+ "V4",+ "V4_5",+ "V4_5PLUS",+ "V4_5ALL",+ "V5",+ "V5_5"+ ],+ "title": "Model",+ "name": "model",+ "type": "string",+ "description": "The AI model version to use for generation.",+ "default": "V5"+ },+ "custom_mode": {+ "type": "boolean",+ "title": "Custom Mode",+ "name": "custom_mode",+ "description": "Enable custom mode for advanced settings.",+ "default": true+ },+ "title": {+ "type": "string",+ "title": "Title",+ "name": "title",+ "description": "Title for the generated music track (optional).",+ "placeholder": "Peaceful Piano Meditation"+ },+ "persona_id": {+ "type": "string",+ "title": "Persona ID",+ "name": "persona_id",+ "description": "Persona ID or custom voice ID to apply to the generated music (optional). Pair with persona_model to disambiguate."+ },+ "persona_model": {+ "enum": [+ "style_persona",+ "voice_persona"+ ],+ "type": "string",+ "title": "Persona Model",+ "name": "persona_model",+ "description": "What kind of persona_id this is. Set to voice_persona when persona_id is a cloned voice ID from suno-voice-clone. Requires model V5 or V5_5."+ },+ "instrumental": {+ "type": "boolean",+ "title": "Instrumental",+ "name": "instrumental",+ "description": "Enable this option to generate music without prompt. If false prompt will used as the exact lyrics.",+ "default": true+ },+ "negative_tags": {+ "examples": [+ null+ ],+ "title": "Negative Tags",+ "name": "negative_tags",+ "type": "string",+ "format": "text",+ "description": "Music styles or traits to exclude from the generated audio (optional). Use to avoid specific styles.",+ "placeholder": "Heavy Metal, Upbeat Drums"+ },+ "vocal_gender": {+ "enum": [+ "male",+ "female"+ ],+ "title": "Vocal Gender",+ "name": "vocal_gender",+ "type": "string",+ "description": "Vocal gender preference for the singing voice (optional).",+ "default": "male"+ },+ "style_weight": {+ "title": "Style Weight",+ "name": "style_weight",+ "type": "int",+ "description": "Strength of adherence to the specified style (optional). Range 0ΓÇô1, up to 2 decimal places.",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "weirdness_constraint": {+ "title": "Weirdness Constraint",+ "name": "weirdness_constraint",+ "type": "int",+ "description": "Controls experimental/creative deviation (optional). Range 0ΓÇô1, up to 2 decimal places.",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "audio_weight": {+ "title": "Audio Weight",+ "name": "audio_weight",+ "type": "int",+ "description": "Balance weight for audio features vs. other factors (optional). Range 0ΓÇô1, up to 2 decimal places.",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ }+ }+ },+ {+ "id": "suno-remix-music",+ "name": "Suno Remix Music",+ "endpoint": "suno-remix-music",+ "family": "suno",+ "description": "This API covers an audio track by transforming it into a new style while retaining its core melody. It incorporates Suno's upload capability, enabling users to upload an audio file for processing. The expected result is a refreshed audio track with a new style, keeping the original melody intact.",+ "required": [+ "audio_url",+ "style"+ ],+ "inputs": {+ "prompt": {+ "examples": [+ "A calm and relaxing piano track with soft melodies"+ ],+ "description": "A description of the desired audio content. The prompt will be strictly used as the lyrics and sung in the generated track. Maximum 3000 characters",+ "type": "string",+ "title": "Prompt",+ "name": "prompt"+ },+ "audio_url": {+ "examples": [+ "https://d3adwkbyhxyrtq.cloudfront.net/ai-music/186/309018126238/c7e634cf-f0f3-4988-8225-4e7d0eb6121b.mp3"+ ],+ "description": "The URL for uploading audio files. Ensure the uploaded audio does not exceed 2 minutes in length.",+ "field": "audio",+ "type": "string",+ "title": "Audio URL",+ "name": "audio_url"+ },+ "style": {+ "examples": [+ "Classical"+ ],+ "description": "Music style specification for the generated audio.",+ "format": "text",+ "type": "string",+ "title": "Style",+ "name": "style",+ "placeholder": "Jazz, Classical, Electronic, Pop, Rock, Hip-hop, etc."+ },+ "model": {+ "enum": [+ "V3_5",+ "V4",+ "V4_5",+ "V4_5PLUS",+ "V4_5ALL",+ "V5",+ "V5_5"+ ],+ "title": "Model",+ "name": "model",+ "type": "string",+ "description": "The AI model version to use for generation.",+ "default": "V5"+ },+ "custom_mode": {+ "type": "boolean",+ "title": "Custom Mode",+ "name": "custom_mode",+ "description": "Enable custom mode for advanced settings.",+ "default": true+ },+ "title": {+ "type": "string",+ "title": "Title",+ "name": "title",+ "description": "Title for the generated music track (optional).",+ "placeholder": "Peaceful Piano Meditation"+ },+ "persona_id": {+ "type": "string",+ "title": "Persona ID",+ "name": "persona_id",+ "description": "Persona ID or custom voice ID to apply to the generated music (optional). Pair with persona_model to disambiguate."+ },+ "persona_model": {+ "enum": [+ "style_persona",+ "voice_persona"+ ],+ "type": "string",+ "title": "Persona Model",+ "name": "persona_model",+ "description": "What kind of persona_id this is. Set to voice_persona when persona_id is a cloned voice ID from suno-voice-clone. Requires model V5 or V5_5."+ },+ "instrumental": {+ "type": "boolean",+ "title": "Instrumental",+ "name": "instrumental",+ "description": "Enable this option to generate music without prompt. If false prompt will used as the exact lyrics.",+ "default": true+ },+ "negative_tags": {+ "examples": [+ null+ ],+ "title": "Negative Tags",+ "name": "negative_tags",+ "type": "string",+ "format": "text",+ "description": "Music styles or traits to exclude from the generated audio (optional). Use to avoid specific styles.",+ "placeholder": "Heavy Metal, Upbeat Drums"+ },+ "vocal_gender": {+ "enum": [+ "male",+ "female"+ ],+ "title": "Vocal Gender",+ "name": "vocal_gender",+ "type": "string",+ "description": "Vocal gender preference for the singing voice (optional).",+ "default": "male"+ },+ "style_weight": {+ "title": "Style Weight",+ "name": "style_weight",+ "type": "int",+ "description": "Strength of adherence to the specified style (optional). Range 0ΓÇô1, up to 2 decimal places.",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "weirdness_constraint": {+ "title": "Weirdness Constraint",+ "name": "weirdness_constraint",+ "type": "int",+ "description": "Controls experimental/creative deviation (optional). Range 0ΓÇô1, up to 2 decimal places.",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "audio_weight": {+ "title": "Audio Weight",+ "name": "audio_weight",+ "type": "int",+ "description": "Balance weight for audio features vs. other factors (optional). Range 0ΓÇô1, up to 2 decimal places.",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ }+ }+ },+ {+ "id": "suno-extend-music",+ "name": "Suno Extend Music",+ "endpoint": "suno-extend-music",+ "family": "suno",+ "description": "This API extends audio tracks while preserving the original style of the audio track. It includes Suno's upload functionality, allowing users to upload audio files for processing. The expected result is a longer track that seamlessly continues the input style.",+ "required": [+ "prompt",+ "audio_url",+ "style"+ ],+ "inputs": {+ "prompt": {+ "examples": [+ "Extend the music with more relaxing notes"+ ],+ "description": "A description of the desired audio content. The prompt will be strictly used as the lyrics and sung in the generated track. Maximum 3000 characters",+ "type": "string",+ "title": "Prompt",+ "name": "prompt"+ },+ "audio_url": {+ "examples": [+ "https://d3adwkbyhxyrtq.cloudfront.net/audios/186/755853337445/example.mp3"+ ],+ "description": "The URL for uploading audio files. Ensure the uploaded audio does not exceed 2 minutes in length.",+ "field": "audio",+ "type": "string",+ "title": "Audio URL",+ "name": "audio_url"+ },+ "style": {+ "examples": [+ "Classical"+ ],+ "description": "Music style specification for the generated audio.",+ "format": "text",+ "type": "string",+ "title": "Style",+ "name": "style",+ "placeholder": "Jazz, Classical, Electronic, Pop, Rock, Hip-hop, etc."+ },+ "model": {+ "enum": [+ "V3_5",+ "V4",+ "V4_5",+ "V4_5PLUS",+ "V4_5ALL",+ "V5",+ "V5_5"+ ],+ "title": "Model",+ "name": "model",+ "type": "string",+ "description": "The AI model version to use for generation.",+ "default": "V5"+ },+ "custom_mode": {+ "type": "boolean",+ "title": "Custom Mode",+ "name": "custom_mode",+ "description": "Enable custom mode for advanced settings.",+ "default": true+ },+ "title": {+ "type": "string",+ "title": "Title",+ "name": "title",+ "description": "Title for the generated music track (optional).",+ "placeholder": "Peaceful Piano Meditation"+ },+ "persona_id": {+ "type": "string",+ "title": "Persona ID",+ "name": "persona_id",+ "description": "Persona ID or custom voice ID to apply to the generated music (optional). Pair with persona_model to disambiguate."+ },+ "persona_model": {+ "enum": [+ "style_persona",+ "voice_persona"+ ],+ "type": "string",+ "title": "Persona Model",+ "name": "persona_model",+ "description": "What kind of persona_id this is. Set to voice_persona when persona_id is a cloned voice ID from suno-voice-clone. Requires model V5 or V5_5."+ },+ "continue_at": {+ "title": "Continue At",+ "name": "continue_at",+ "type": "int",+ "description": "The time point (in seconds) from which to start extending the music. Value range: greater than 0 and less than the total duration of the uploaded audio. Specifies the position in the original track where the extension should begin.",+ "default": 1,+ "minValue": 1,+ "maxValue": 60,+ "step": 1+ },+ "instrumental": {+ "type": "boolean",+ "title": "Instrumental",+ "name": "instrumental",+ "description": "Enable this option to generate music without prompt. If false prompt will used as the exact lyrics.",+ "default": true+ },+ "negative_tags": {+ "examples": [+ null+ ],+ "title": "Negative Tags",+ "name": "negative_tags",+ "type": "string",+ "format": "text",+ "description": "Music styles or traits to exclude from the generated audio (optional). Use to avoid specific styles.",+ "placeholder": "Heavy Metal, Upbeat Drums"+ },+ "vocal_gender": {+ "enum": [+ "male",+ "female"+ ],+ "title": "Vocal Gender",+ "name": "vocal_gender",+ "type": "string",+ "description": "Vocal gender preference for the singing voice (optional).",+ "default": "male"+ },+ "style_weight": {+ "title": "Style Weight",+ "name": "style_weight",+ "type": "int",+ "description": "Strength of adherence to the specified style (optional). Range 0ΓÇô1, up to 2 decimal places.",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "weirdness_constraint": {+ "title": "Weirdness Constraint",+ "name": "weirdness_constraint",+ "type": "int",+ "description": "Controls experimental/creative deviation (optional). Range 0ΓÇô1, up to 2 decimal places.",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "audio_weight": {+ "title": "Audio Weight",+ "name": "audio_weight",+ "type": "int",+ "description": "Balance weight for audio features vs. other factors (optional). Range 0ΓÇô1, up to 2 decimal places.",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ }+ }+ },+ {+ "id": "suno-generate-sounds",+ "name": "Suno Generate Sounds",+ "endpoint": "suno-generate-sounds",+ "family": "suno",+ "description": "Generate sound effects using Suno chirp-crow model.",+ "required": [+ "prompt"+ ],+ "inputs": {+ "prompt": {+ "type": "string",+ "title": "Prompt",+ "name": "prompt",+ "description": "sounds task type supports up to 500 characters.",+ "examples": [+ "A car passing by"+ ]+ },+ "model": {+ "enum": [+ "V5"+ ],+ "type": "string",+ "title": "Model",+ "name": "model",+ "description": "The model to use",+ "default": "V5"+ },+ "sound_loop": {+ "type": "boolean",+ "title": "Loop",+ "name": "sound_loop",+ "description": "Whether to loop the generated sound.",+ "default": false+ },+ "sound_tempo": {+ "type": "int",+ "title": "Sound Tempo",+ "name": "sound_tempo",+ "description": "Sound tempo",+ "minValue": 1,+ "maxValue": 300,+ "step": 1,+ "default": 1+ },+ "sound_key": {+ "enum": [+ "Any",+ "Cm",+ "C#m",+ "Dm",+ "D#m",+ "Em",+ "Fm",+ "F#m",+ "Gm",+ "G#m",+ "Am",+ "A#m",+ "Bm",+ "C",+ "C#",+ "D",+ "D#",+ "E",+ "F",+ "F#",+ "G",+ "G#",+ "A",+ "A#",+ "B"+ ],+ "type": "string",+ "title": "Sound Key",+ "name": "sound_key",+ "description": "Musical key",+ "default": "Any"+ },+ "grab_lyrics": {+ "type": "boolean",+ "title": "Grab Lyrics",+ "name": "grab_lyrics",+ "description": "Whether to fetch lyric subtitles after generation is completed.",+ "default": false+ }+ }+ },+ {+ "id": "suno-add-vocals",+ "name": "Suno Add Vocals",+ "endpoint": "suno-add-vocals",+ "family": "suno",+ "description": "Add vocals to an instrumental track.",+ "required": [+ "prompt",+ "title",+ "style",+ "audio_url"+ ],+ "inputs": {+ "prompt": {+ "type": "string",+ "title": "Prompt (Lyrics)",+ "name": "prompt",+ "description": "Lyrics to sing",+ "examples": [+ "[Verse 1]\nHello world..."+ ]+ },+ "audio_url": {+ "type": "string",+ "title": "Instrumental Audio",+ "name": "audio_url",+ "description": "URL of instrumental track",+ "field": "audio"+ },+ "style": {+ "type": "string",+ "title": "Style",+ "name": "style",+ "description": "Vocal style",+ "examples": [+ "Pop"+ ]+ },+ "negative_tags": {+ "type": "string",+ "title": "Negative Tags",+ "name": "negative_tags",+ "description": "Excluded styles"+ },+ "model": {+ "enum": [+ "V4",+ "V4_5",+ "V4_5PLUS",+ "V5"+ ],+ "title": "Model",+ "name": "model",+ "type": "string",+ "description": "The AI model version to use.",+ "default": "V5"+ },+ "vocal_gender": {+ "enum": [+ "male",+ "female"+ ],+ "title": "Vocal Gender",+ "name": "vocal_gender",+ "type": "string",+ "description": "Vocal gender preference.",+ "default": "male"+ },+ "style_weight": {+ "title": "Style Weight",+ "name": "style_weight",+ "type": "int",+ "description": "Strength of style adherence (0-1).",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "weirdness_constraint": {+ "title": "Weirdness Constraint",+ "name": "weirdness_constraint",+ "type": "int",+ "description": "Experimental deviation (0-1).",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.01,+ "default": 0.65+ },+ "audio_weight": {+ "title": "Audio Weight",+ "name": "audio_weight",+ "type": "int",+ "description": "Balance weight (0-1).",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.01,+ "default": 0.65+ },+ "title": {+ "type": "string",+ "title": "Title",+ "name": "title",+ "description": "Track title",+ "default": "New Vocal Track"+ }+ }+ },+ {+ "id": "suno-generate-mashup",+ "name": "Suno Geneate Mashup",+ "endpoint": "suno-generate-mashup",+ "family": "suno",+ "description": "Create a mashup using 1-5 audio tracks.",+ "required": [+ "audios_list"+ ],+ "inputs": {+ "audios_list": {+ "type": "array",+ "title": "Mashup Tracks",+ "name": "audios_list",+ "description": "Upload up to 2 audio files to mashup music from multiple audio tracks.",+ "field": "audios_list",+ "items": {+ "type": "string"+ },+ "maxItems": 2+ },+ "prompt": {+ "type": "string",+ "title": "Prompt",+ "name": "prompt",+ "description": "Creative guidance"+ },+ "style": {+ "type": "string",+ "title": "Style",+ "name": "style",+ "description": "Mashup style"+ },+ "instrumental": {+ "type": "boolean",+ "title": "Instrumental",+ "name": "instrumental",+ "description": "If true: Only style is required else style, and prompt are required (with prompt used as the exact lyrics)",+ "default": true+ },+ "model": {+ "enum": [+ "V4",+ "V4_5",+ "V4_5PLUS",+ "V5"+ ],+ "title": "Model",+ "name": "model",+ "type": "string",+ "description": "The AI model version to use.",+ "default": "V5"+ },+ "vocal_gender": {+ "enum": [+ "male",+ "female"+ ],+ "title": "Vocal Gender",+ "name": "vocal_gender",+ "type": "string",+ "description": "Vocal gender preference.",+ "default": "male"+ },+ "style_weight": {+ "title": "Style Weight",+ "name": "style_weight",+ "type": "int",+ "description": "Strength of style adherence (0-1).",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "weirdness_constraint": {+ "title": "Weirdness Constraint",+ "name": "weirdness_constraint",+ "type": "int",+ "description": "Experimental deviation (0-1).",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "audio_weight": {+ "title": "Audio Weight",+ "name": "audio_weight",+ "type": "int",+ "description": "Balance weight (0-1).",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "title": {+ "type": "string",+ "title": "Title",+ "name": "title",+ "description": "Mashup title",+ "default": "New Mashup"+ }+ }+ },+ {+ "id": "suno-add-instrumental",+ "name": "Suno Add Instrumental",+ "endpoint": "suno-add-instrumental",+ "family": "suno",+ "description": "Add instrumental backing to acapella audio.",+ "required": [+ "title",+ "tags",+ "audio_url"+ ],+ "inputs": {+ "audio_url": {+ "type": "string",+ "title": "Vocal Audio",+ "name": "audio_url",+ "description": "URL of vocal track",+ "field": "audio"+ },+ "tags": {+ "type": "string",+ "title": "Tags",+ "name": "tags",+ "description": "Instrumental styles",+ "examples": [+ "Orchestral"+ ]+ },+ "negative_tags": {+ "type": "string",+ "title": "Negative Tags",+ "name": "negative_tags",+ "description": "Excluded styles"+ },+ "model": {+ "enum": [+ "V4",+ "V4_5",+ "V4_5PLUS",+ "V5"+ ],+ "title": "Model",+ "name": "model",+ "type": "string",+ "description": "The AI model version to use.",+ "default": "V5"+ },+ "vocal_gender": {+ "enum": [+ "male",+ "female"+ ],+ "title": "Vocal Gender",+ "name": "vocal_gender",+ "type": "string",+ "description": "Vocal gender preference.",+ "default": "male"+ },+ "style_weight": {+ "title": "Style Weight",+ "name": "style_weight",+ "type": "int",+ "description": "Strength of style adherence (0-1).",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "weirdness_constraint": {+ "title": "Weirdness Constraint",+ "name": "weirdness_constraint",+ "type": "int",+ "description": "Experimental deviation (0-1).",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "audio_weight": {+ "title": "Audio Weight",+ "name": "audio_weight",+ "type": "int",+ "description": "Balance weight (0-1).",+ "minValue": 0,+ "maxValue": 1,+ "step": 0.05,+ "default": 0.65+ },+ "title": {+ "type": "string",+ "title": "Title",+ "name": "title",+ "description": "Track title",+ "default": "Instrumental Song"+ }+ }+ },+ {+ "id": "suno-voice-clone",+ "name": "Suno Voice Cloning",+ "endpoint": "suno-voice-clone",+ "family": "suno",+ "description": "Clone your singing voice in two takes for use with Suno music generation. Submit a 10-second sample, then read back a fresh random phrase the system generates (anti-deepfake liveness check), and receive a reusable voice_id you can drop into Suno music creation. Free during preview.",+ "required": [+ "audio_url"+ ],+ "inputs": {+ "audio_url": {+ "examples": [+ "https://d3adwkbyhxyrtq.cloudfront.net/webassets/videomodels/minimax-voice-clone-in.wav"+ ],+ "description": "URL of a clean 10-second recording of the voice to clone. Mono is fine. The provider extracts a vocal segment between vocal_start_s and vocal_end_s.",+ "field": "audio",+ "type": "string",+ "title": "Voice Sample URL",+ "name": "audio_url"+ },+ "voice_name": {+ "type": "string",+ "title": "Voice Name",+ "name": "voice_name",+ "description": "A short label for your voice, shown in the voice picker (optional).",+ "placeholder": "My Voice"+ },+ "description": {+ "type": "string",+ "title": "Description",+ "name": "description",+ "description": "Free-form description of this voice (optional).",+ "placeholder": "Warm female alto, slight rasp."+ },+ "style": {+ "type": "string",+ "title": "Style Tags",+ "name": "style",+ "description": "Comma-separated style hints used at music generation time (optional).",+ "placeholder": "Pop, Female Vocal"+ },+ "language": {+ "enum": [+ "en",+ "zh",+ "es",+ "fr",+ "pt",+ "de",+ "ja",+ "ko",+ "hi",+ "ru"+ ],+ "title": "Language",+ "name": "language",+ "type": "string",+ "description": "Language the voice sample is spoken in.",+ "default": "en"+ },+ "vocal_start_s": {+ "type": "int",+ "title": "Vocal Start (seconds)",+ "name": "vocal_start_s",+ "description": "Start time of the vocal segment within the sample.",+ "default": 0,+ "minValue": 0,+ "maxValue": 60,+ "step": 1+ },+ "vocal_end_s": {+ "type": "int",+ "title": "Vocal End (seconds)",+ "name": "vocal_end_s",+ "description": "End time of the vocal segment within the sample. Must be greater than Vocal Start.",+ "default": 10,+ "minValue": 1,+ "maxValue": 60,+ "step": 1+ }+ }+ },+ {+ "id": "minimax-voice-clone",+ "name": "Minimax Voice Clone",+ "endpoint": "minimax-voice-clone",+ "family": "minimax-2.3",+ "description": "Minimax Voice Clone creates a high-fidelity digital clone of a speakerΓÇÖs voice from a short reference audio sample. It reproduces the speakerΓÇÖs tone, emotion, accent, rhythm, and speaking style, then generates new speech from any text input.",+ "required": [+ "audio_url",+ "custom_voice_id"+ ],+ "inputs": {+ "audio_url": {+ "examples": [+ "https://d3adwkbyhxyrtq.cloudfront.net/webassets/videomodels/minimax-voice-clone-in.wav"+ ],+ "description": "Url of the audio url.",+ "field": "audio",+ "type": "string",+ "title": "Audio URL",+ "name": "audio_url"+ },+ "custom_voice_id": {+ "examples": [+ ""+ ],+ "description": "Custom user-defined ID. Minimum 8 characters must include letters and numbers and start with a letter. Duplicate voice-ids will throw an error.",+ "format": "text",+ "type": "string",+ "title": "Custom Voice ID",+ "name": "custom_voice_id",+ "placeholder": "sf02174c-5f5d-46e6-8758-7544128c27b2"+ },+ "model": {+ "enum": [+ "speech-02-hd",+ "speech-02-turbo",+ "speech-2.5-hd-preview",+ "speech-2.5-turbo-preview",+ "speech-2.6-hd",+ "speech-2.6-turbo"+ ],+ "title": "Model",+ "name": "model",+ "type": "string",+ "description": "Specify the TTS model to be used for the preview. This is only a preview after cloning. Once the model is generated, any Minimax Turbo or HD voice model can be used for inference.",+ "default": "speech-02-hd"+ },+ "need_noise_reduction": {+ "type": "boolean",+ "title": "Need Noise Reduction",+ "name": "need_noise_reduction",+ "description": "Enable noise reduction. Default is false (no noise reduction).",+ "default": false+ },+ "need_volume_normalization": {+ "type": "boolean",+ "title": "Need Volume Normalization",+ "name": "need_volume_normalization",+ "description": "Specify whether to enable volume normalization.",+ "default": false+ },+ "accuracy": {+ "title": "Accuracy",+ "name": "accuracy",+ "type": "int",+ "description": "Text validation accuracy threshold, with a value range of [0, 1].",+ "default": 0.7,+ "minValue": 0,+ "maxValue": 1,+ "step": 0.01+ },+ "prompt": {+ "examples": [+ "Hello! Welcome to Muapiapp! This is a preview of your cloned voice. I hope you enjoy it!"+ ],+ "description": "Text for audio preview. Limited to 2000 characters.",+ "type": "string",+ "title": "Prompt",+ "name": "prompt"+ }+ }+ },+ {+ "id": "minimax-speech-2.6-hd",+ "name": "Minimax Speech HD",+ "endpoint": "minimax-speech-2.6-hd",+ "family": "minimax-2.6",+ "description": "Speech-2.6-hd is MinimaxΓÇÖs high-definition text-to-speech model that turns written text into natural, human-like audio. It produces studio-quality speech with clear pronunciation, smooth pacing, realistic emotion, and no background noise.",+ "required": [+ "prompt",+ "voice_id"+ ],+ "inputs": {+ "prompt": {+ "examples": [+ "Every journey begins with a single moment of courage. Today, that moment is yours."+ ],+ "description": "Text to convert to speech. Every character is 1 token. Maximum 10000 characters. Use <#x#> between words to control pause duration (0.01-99.99s).",+ "type": "string",+ "title": "Prompt",+ "name": "prompt"+ },+ "voice_id": {+ "enum": [+ "Wise_Woman",+ "Friendly_Person",+ "Inspirational_girl",+ "Deep_Voice_Man",+ "Calm_Woman",+ "Casual_Guy",+ "Lively_Girl",+ "Patient_Man",+ "Young_Knight",+ "Determined_Man",+ "Lovely_Girl",+ "Decent_Boy",+ "Imposing_Manner",+ "Elegant_Man",+ "Abbess",+ "Sweet_Girl_2",+ "Exuberant_Girl",+ "English_expressive_narrator",+ "English_radiant_girl",+ "English_magnetic_voiced_man",+ "English_compelling_lady1",+ "English_Aussie_Bloke",+ "English_captivating_female1",+ "English_Upbeat_Woman",+ "English_Trustworth_Man",+ "English_CalmWoman",+ "English_UpsetGirl",+ "English_Gentle-voiced_man",+ "English_Whispering_girl_v3",+ "English_Diligent_Man",+ "English_Graceful_Lady",+ "English_Husky_MetalHead",+ "English_ReservedYoungMan",+ "Thai_female_1_sample1",+ "Thai_female_2_sample2",+ "English_PlayfulGirl",+ "English_ManWithDeepVoice",+ "English_GentleTeacher",+ "English_MaturePartner",+ "English_FriendlyPerson",+ "English_MatureBoss",+ "English_Debator",+ "whisper_man",+ "English_Abbess",+ "English_LovelyGirl",+ "whisper_woman_1",+ "English_Steadymentor",+ "English_Deep-VoicedGentleman",+ "English_DeterminedMan",+ "English_Wiselady",+ "English_CaptivatingStoryteller",+ "English_AttractiveGirl",+ "English_DecentYoungMan",+ "English_SentimentalLady",+ "English_ImposingManner",+ "English_SadTeen",+ "English_ThoughtfulMan",+ "English_PassionateWarrior",+ "English_DecentBoy",+ "English_WiseScholar",+ "English_Soft-spokenGirl",+ "English_SereneWoman",+ "English_ConfidentWoman",+ "English_PatientMan",+ "English_Comedian",+ "English_GorgeousLady",+ "English_BossyLeader",+ "English_LovelyLady",+ "English_Strong-WilledBoy",+ "English_Deep-tonedMan",+ "English_StressedLady",+ "English_AssertiveQueen",+ "English_AnimeCharacter",+ "Portuguese_Optimisticyouth",+ "Portuguese_CuteElf",+ "English_Jovialman",+ "English_WhimsicalGirl",+ "English_CharmingQueen",+ "English_Kind-heartedGirl",+ "English_FriendlyNeighbor",+ "English_Sweet_Female_4",+ "English_Magnetic_Male_2",+ "English_Lively_Male_11",+ "English_Friendly_Female_3",+ "English_Steady_Female_1",+ "English_Lively_Male_10",+ "English_Magnetic_Male_12",+ "English_Steady_Female_5",+ "English_Insightful_Speaker",+ "English_patient_man_v1",+ "English_Persuasive_Man",+ "English_Explanatory_Man",+ "English_intellect_female_1",+ "English_Cute_Girl",+ "English_Sharp_Commentator",+ "English_Honest_Man",+ "angry_pirate_1",+ "massive_kind_troll",+ "movie_trailer_deep",+ "peace_and_ease",+ "moss_audio_6dc281eb-713c-11f0-a447-9613c873494c",+ "moss_audio_c12a59b9-7115-11f0-a447-9613c873494c",+ "moss_audio_076697ad-7144-11f0-a447-9613c873494c",+ "moss_audio_737a299c-734a-11f0-918f-4e0486034804",+ "moss_audio_19dbb103-7350-11f0-ad20-f2bc95e89150",+ "moss_audio_7c7e7ae2-7356-11f0-9540-7ef9b4b62566",+ "moss_audio_570551b1-735c-11f0-b236-0adeeecad052",+ "conversational_female_1_v1",+ "conversational_female_2_v1",+ "socialmedia_female_1_v1",+ "BritishChild_male_1_v1",+ "BritishChild_female_1_v1",+ "Chinese (Mandarin)_Reliable_Executive",+ "Chinese (Mandarin)_News_Anchor",+ "Chinese (Mandarin)_Unrestrained_Young_Man",+ "Chinese (Mandarin)_Mature_Woman",+ "Arrogant_Miss",+ "Chinese (Mandarin)_Kind-hearted_Antie",+ "Robot_Armor",+ "hunyin_6",+ "Chinese (Mandarin)_HK_Flight_Attendant",+ "Chinese (Mandarin)_Humorous_Elder",+ "Chinese (Mandarin)_Gentleman",+ "Chinese (Mandarin)_Warm_Bestie",+ "Chinese (Mandarin)_Southern_Young_Man",+ "Chinese (Mandarin)_Wise_Women",+ "moss_audio_cedfd4d2-736d-11f0-99be-fe40dd2a5fe8",+ "moss_audio_a0d611da-737c-11f0-ad20-f2bc95e89150",+ "moss_audio_4f4172f4-737b-11f0-9540-7ef9b4b62566",+ "moss_audio_62ca20b0-7380-11f0-99be-fe40dd2a5fe8",+ "Portuguese_PowerfulSoldier",+ "Portuguese_FascinatingBoy",+ "Portuguese_RomanticHusband",+ "Portuguese_StrictBoss",+ "Chinese (Mandarin)_Stubborn_Friend",+ "Chinese (Mandarin)_Sweet_Lady",+ "moss_audio_ad5baf92-735f-11f0-8263-fe5a2fe98ec8",+ "Chinese (Mandarin)_Gentle_Youth",+ "Chinese (Mandarin)_Warm_Girl",+ "Chinese (Mandarin)_Male_Announcer",+ "Chinese (Mandarin)_Kind-hearted_Elder",+ "Chinese (Mandarin)_Cute_Spirit",+ "Chinese (Mandarin)_Radio_Host",+ "Chinese (Mandarin)_Lyrical_Voice",+ "Chinese (Mandarin)_Straightforward_Boy",+ "Chinese (Mandarin)_Sincere_Adult",+ "Chinese (Mandarin)_Gentle_Senior",+ "Chinese (Mandarin)_Crisp_Girl",+ "Chinese (Mandarin)_Pure-hearted_Boy",+ "Chinese (Mandarin)_Soft_Girl",+ "Chinese (Mandarin)_IntellectualGirl",+ "Chinese (Mandarin)_Laid_BackGirl",+ "Chinese (Mandarin)_ExplorativeGirl",+ "Chinese (Mandarin)_Warm-HeartedAunt",+ "Chinese (Mandarin)_BashfulGirl",+ "Arabic_CalmWoman",+ "Arabic_FriendlyGuy",+ "Cantonese_ProfessionalHost∩╝êF)",+ "Cantonese_GentleLady",+ "Cantonese_ProfessionalHost∩╝êM)",+ "Cantonese_PlayfulMan",+ "Cantonese_CuteGirl",+ "Cantonese_KindWoman",+ "Cantonese_Narrator",+ "Cantonese_WiselProfessor",+ "Cantonese_IndifferentStaff",+ "Japanese_ColdQueen",+ "Japanese_DependableWoman",+ "Japanese_GentleButler",+ "Japanese_KindLady",+ "Dutch_kindhearted_girl",+ "Dutch_bossy_leader",+ "French_Male_Speech_New",+ "French_Female_News Anchor",+ "French_CasualMan",+ "French_MovieLeadFemale",+ "French_FemaleAnchor",+ "French_MaleNarrator",+ "French_Female Journalist",+ "French_Female_Speech_New",+ "German_FriendlyMan",+ "German_SweetLady",+ "German_PlayfulMan",+ "Indonesian_SweetGirl",+ "Indonesian_ReservedYoungMan",+ "Indonesian_CharmingGirl",+ "Russian_AmbitiousWoman",+ "Russian_ReliableMan",+ "Russian_CrazyQueen",+ "Russian_PessimisticGirl",+ "Indonesian_CalmWoman",+ "Indonesian_ConfidentWoman",+ "Indonesian_CaringMan",+ "Indonesian_BossyLeader",+ "Indonesian_DeterminedBoy",+ "Indonesian_GentleGirl",+ "Italian_BraveHeroine",+ "Italian_Narrator",+ "Italian_WanderingSorcerer",+ "Italian_DiligentLeader",+ "Italian_ReliableMan",+ "Italian_AthleticStudent",+ "Italian_ArrogantPrincess",+ "Japanese_Whisper_Belle",+ "Japanese_IntellectualSenior",+ "Japanese_DecisivePrincess",+ "Japanese_LoyalKnight",+ "Japanese_DominantMan",+ "Japanese_SeriousCommander",+ "Japanese_CalmLady",+ "Japanese_OptimisticYouth",+ "Japanese_GenerousIzakayaOwner",+ "Japanese_SportyStudent",+ "Japanese_InnocentBoy",+ "Japanese_GracefulMaiden",+ "Korean_PowerfulGirl",+ "Korean_BossyMan",+ "Korean_SweetGirl",+ "Korean_CheerfulBoyfriend",+ "Korean_EnchantingSister",+ "Korean_ShyGirl",+ "Korean_ReliableSister",+ "Korean_StrictBoss",+ "Korean_SassyGirl",+ "Korean_ChildhoodFriendGirl",+ "Korean_PlayboyCharmer",+ "Korean_ElegantPrincess",+ "English_energetic_male_1",+ "English_witty_female_1",+ "English_Lucky_Robot",+ "Korean_BraveFemaleWarrior",+ "Korean_BraveYouth",+ "Korean_CalmLady",+ "Korean_EnthusiasticTeen",+ "Korean_SoothingLady",+ "Korean_IntellectualSenior",+ "Korean_LonelyWarrior",+ "Korean_MatureLady",+ "Korean_InnocentBoy",+ "Korean_CharmingSister",+ "Korean_AthleticStudent",+ "Korean_BraveAdventurer",+ "Korean_CalmGentleman",+ "Korean_WiseElf",+ "Korean_CheerfulCoolJunior",+ "Korean_DecisiveQueen",+ "Korean_ColdYoungMan",+ "Korean_MysteriousGirl",+ "Korean_QuirkyGirl",+ "Korean_ConsiderateSenior",+ "Chinese (Mandarin)_Warm_HeartedGirl",+ "Korean_CheerfulLittleSister",+ "Korean_DominantMan",+ "Korean_AirheadedGirl",+ "Korean_ReliableYouth",+ "Korean_FriendlyBigSister",+ "Korean_GentleBoss",+ "Korean_ColdGirl",+ "Korean_HaughtyLady",+ "Korean_CharmingElderSister",+ "Korean_IntellectualMan",+ "Korean_CaringWoman",+ "Korean_WiseTeacher",+ "Korean_ConfidentBoss",+ "Korean_AthleticGirl",+ "Korean_PossessiveMan",+ "Korean_GentleWoman",+ "Korean_CockyGuy",+ "Korean_ThoughtfulWoman",+ "Korean_OptimisticYouth",+ "Portuguese_AnxiousMan",+ "Portuguese_Matureresearcher",+ "Portuguese_EnergeticGirl",+ "Portuguese_FunnyGuy",+ "Portuguese_Nuttylady",+ "Portuguese_Deep-tonedMan",+ "Portuguese_SentimentalLady",+ "Portuguese_BossyLeader",+ "Portuguese_Wiselady",+ "Portuguese_Strong-WilledBoy",+ "Portuguese_Deep-VoicedGentleman",+ "Portuguese_UpsetGirl",+ "Portuguese_PassionateWarrior",+ "Portuguese_AnimeCharacter",+ "Portuguese_ConfidentWoman",+ "Portuguese_AngryMan",+ "Portuguese_CaptivatingStoryteller",+ "Portuguese_Godfather",+ "Portuguese_ReservedYoungMan",+ "Portuguese_SmartYoungGirl",+ "Portuguese_Kind-heartedGirl",+ "Portuguese_Pompouslady",+ "Portuguese_Grinch",+ "Portuguese_Debator",+ "Portuguese_SweetGirl",+ "Portuguese_AttractiveGirl",+ "Portuguese_ThoughtfulMan",+ "Portuguese_PlayfulGirl",+ "Portuguese_GorgeousLady",+ "Portuguese_LovelyLady",+ "Portuguese_SereneWoman",+ "Portuguese_SadTeen",+ "Portuguese_MaturePartner",+ "Portuguese_Comedian",+ "Portuguese_NaughtySchoolgirl",+ "Portuguese_Narrator",+ "Portuguese_ToughBoss",+ "Portuguese_Fussyhostess",+ "Portuguese_Dramatist",+ "Portuguese_Steadymentor",+ "Portuguese_Jovialman",+ "Portuguese_CharmingQueen",+ "Portuguese_SantaClaus",+ "Portuguese_Rudolph",+ "Portuguese_Arnold",+ "Portuguese_CharmingSanta",+ "Portuguese_Ghost",+ "Portuguese_HumorousElder",+ "Portuguese_CalmLeader",+ "Portuguese_GentleTeacher",+ "Portuguese_EnergeticBoy",+ "Portuguese_ReliableMan",+ "Portuguese_SereneElder",+ "Portuguese_GrimReaper",+ "Portuguese_AssertiveQueen",+ "Portuguese_WhimsicalGirl",+ "Portuguese_StressedLady",+ "Portuguese_FriendlyNeighbor",+ "Portuguese_CaringGirlfriend",+ "Portuguese_InspiringLady",+ "Portuguese_PlayfulSpirit",+ "Portuguese_ElegantGirl",+ "Portuguese_CompellingGirl",+ "Portuguese_PowerfulVeteran",+ "Portuguese_SensibleManager",+ "Portuguese_ThoughtfulLady",+ "Portuguese_TheatricalActor",+ "Portuguese_FragileBoy",+ "Portuguese_ChattyGirl",+ "Portuguese_Conscientiousinstructor",+ "Portuguese_RationalMan",+ "Portuguese_WiseScholar",+ "Portuguese_FrankLady",+ "Portuguese_DeterminedManager",+ "Portuguese_CharmingLady",+ "Russian_HandsomeChildhoodFriend",+ "Russian_BrightHeroine",+ "Russian_AttractiveGuy",+ "Russian_Bad-temperedBoy",+ "Spanish_FriendlyNeighbor",+ "Spanish_FragileBoy",+ "Spanish_UpsetGirl",+ "Spanish_Soft-spokenGirl",+ "Spanish_CharmingQueen",+ "Spanish_Nuttylady",+ "Spanish_ElegantGirl",+ "Spanish_FascinatingBoy",+ "Spanish_FunnyGuy",+ "Spanish_PlayfulSpirit",+ "Spanish_TheatricalActor",+ "Spanish_SereneWoman",+ "Spanish_MaturePartner",+ "Spanish_CaptivatingStoryteller",+ "Spanish_Narrator",+ "Spanish_WiseScholar",+ "Spanish_Kind-heartedGirl",+ "Spanish_DeterminedManager",+ "Spanish_BossyLeader",+ "Spanish_ReservedYoungMan",+ "Spanish_ConfidentWoman",+ "Spanish_ThoughtfulMan",+ "Spanish_Strong-WilledBoy",+ "Spanish_SophisticatedLady",+ "Spanish_RationalMan",+ "Spanish_AnimeCharacter",+ "Spanish_Deep-tonedMan",+ "Spanish_Fussyhostess",+ "Spanish_SincereTeen",+ "Spanish_FrankLady",+ "Spanish_Comedian",+ "Spanish_Debator",+ "Spanish_ToughBoss",+ "Spanish_Wiselady",+ "Spanish_Steadymentor",+ "finnish_male_1_v2",+ "hindi_male_1_v2",+ "hindi_female_2_v1",+ "hindi_female_1_v2",+ "Spanish_Jovialman",+ "Spanish_SantaClaus",+ "Spanish_Rudolph",+ "Spanish_Intonategirl",+ "Spanish_Arnold",+ "Spanish_Ghost",+ "Spanish_HumorousElder",+ "Spanish_EnergeticBoy",+ "Spanish_WhimsicalGirl",+ "Spanish_StrictBoss",+ "Spanish_ReliableMan",+ "Spanish_SereneElder",+ "Spanish_AngryMan",+ "Spanish_AssertiveQueen",+ "Spanish_CaringGirlfriend",+ "Spanish_PowerfulSoldier",+ "Spanish_PassionateWarrior",+ "Spanish_ChattyGirl",+ "Spanish_RomanticHusband",+ "Spanish_CompellingGirl",+ "Spanish_PowerfulVeteran",+ "Spanish_SensibleManager",+ "Spanish_ThoughtfulLady",+ "Turkish_CalmWoman",+ "Turkish_Trustworthyman",+ "Ukrainian_CalmWoman",+ "Ukrainian_WiseScholar",+ "Vietnamese_Serene_Man",+ "Vietnamese_female_4_v1",+ "Vietnamese_male_1_v2",+ "Vietnamese_kindhearted_girl",+ "Thai_Optimistic_girl",+ "Thai_male_1_sample8",+ "Thai_Tender_Woman",+ "Thai_male_2_sample2",+ "Polish_male_1_sample4",+ "Polish_male_2_sample3",+ "Polish_female_1_sample1",+ "Polish_female_2_sample3",+ "Romanian_male_1_sample2",+ "Romanian_male_2_sample1",+ "Romanian_female_1_sample4",+ "Romanian_female_2_sample1",+ "Greek_female_1_sample1",+ "greek_male_1a_v1",+ "Greek_female_2_sample3",+ "czech_male_1_v1",+ "czech_female_5_v7",+ "czech_female_2_v2",+ "finnish_male_3_v1",+ "finnish_female_4_v1",+ "Bulgarian_male_2_v1",+ "Bulgarian_female_1_v1",+ "Danish_male_1_v1",+ "Danish_female_1_v1",+ "Hebrew_male_1_v1",+ "Hebrew_female_1_v1",+ "Malay_male_1_v1",+ "Malay_female_1_v1",+ "Malay_female_2_v1",+ "Persian_male_1_v1",+ "Persian_female_1_v1",+ "Slovak_male_1_v1",+ "Slovak_female_1_v1",+ "Swedish_male_1_v1",+ "Swedish_female_1_v1",+ "Croatian_male_1_v1",+ "Croatian_female_1_v1",+ "Filipino_male_1_v1",+ "Filipino_female_1_v1",+ "Hungarian_male_1_v1",+ "Hungarian_female_1_v1",+ "Norwegian_male_1_v1",+ "Norwegian_female_1_v1",+ "Slovenian_male_1_v1",+ "Slovenian_female_1_v2",+ "Catalan_male_1_v1",+ "Catalan_female_1_v1",+ "Nynorsk_male_1_v1",+ "Nynorsk_female_1_v1",+ "Tamil_male_1_v1",+ "Tamil_female_1_v1",+ "Afrikaans_male_1_v1",+ "Afrikaans_female_1_v1"+ ],+ "description": "Desired voice ID. Use a voice ID you have trained (https://muapi.ai/playground/minimax-voice-clone), or one of the following system voice IDs",+ "type": "string",+ "typing": true,+ "title": "Voice ID",+ "name": "voice_id",+ "default": "Friendly_Person"+ },+ "speed": {+ "title": "Speed",+ "name": "speed",+ "type": "int",+ "description": "Speech speed. Range: 0.5-2.0, where 1.0 is normal speed.",+ "default": 1,+ "minValue": 0.5,+ "maxValue": 2,+ "step": 0.01+ },+ "volume": {+ "title": "Volume",+ "name": "volume",+ "type": "int",+ "description": "Speech volume. Range: 0.1-10.0, where 1.0 is normal volume.",+ "default": 1,+ "minValue": 0.1,+ "maxValue": 10,+ "step": 0.01+ },+ "pitch": {+ "title": "Pitch",+ "name": "pitch",+ "type": "int",+ "description": "Speech pitch. Range: -12 to 12, where 0 is normal pitch.",+ "default": 0,+ "minValue": -12,+ "maxValue": 12,+ "step": 1+ },+ "emotion": {+ "enum": [+ "happy",+ "sad",+ "angry",+ "fearful",+ "disgusted",+ "surprised",+ "neutral"+ ],+ "title": "Emotion",+ "name": "emotion",+ "type": "string",+ "description": "The emotion of the generated speech.",+ "default": "happy"+ },+ "english_normalization": {+ "type": "boolean",+ "title": "English Normalization",+ "name": "english_normalization",+ "description": "This parameter supports English text normalization, which improves performance in number-reading scenarios.",+ "default": false+ },+ "sample_rate": {+ "enum": [+ 8000,+ 16000,+ 22050,+ 24000,+ 32000,+ 44100+ ],+ "type": "integer",+ "title": "Sample Rate",+ "name": "sample_rate",+ "description": "Sample rate of generated sound.",+ "default": 8000+ },+ "bitrate": {+ "enum": [+ 32000,+ 64000,+ 128000,+ 256000+ ],+ "type": "integer",+ "title": "Bitrate",+ "name": "bitrate",+ "description": "Bitrate of generated sound.",+ "default": 32000+ },+ "channel": {+ "enum": [+ 1,+ 2+ ],+ "type": "integer",+ "title": "Channel",+ "name": "channel",+ "description": "he number of channels of the generated audio. 1: mono, 2: stereo.",+ "default": 1+ },+ "format": {+ "enum": [+ "mp3",+ "wav",+ "pcm",+ "flac"+ ],+ "type": "string",+ "title": "Format",+ "name": "format",+ "description": "Format of generated sound.",+ "default": "mp3"+ },+ "language_boost": {+ "enum": [+ "Chinese",+ "Chinese,Yue",+ "English",+ "Arabic",+ "Russian",+ "Spanish",+ "French",+ "Portuguese",+ "German",+ "Turkish",+ "Dutch",+ "Ukrainian",+ "Vietnamese",+ "Indonesian",+ "Japanese",+ "Italian",+ "Korean",+ "Thai",+ "Polish",+ "Romanian",+ "Greek",+ "Czech",+ "Finnish",+ "Hindi",+ "Bulgarian",+ "Danish",+ "Hebrew",+ "Malay",+ "Persian",+ "Slovak",+ "Swedish",+ "Croatian",+ "Filipino",+ "Hungarian",+ "Norwegian",+ "Slovenian",+ "Catalan",+ "Nynorsk",+ "Tamil",+ "Afrikaans",+ "auto"+ ],+ "title": "Language Boost",+ "name": "language_boost",+ "type": "string",+ "description": "Enhance the ability to recognize specified languages and dialects.",+ "default": "auto"+ }+ }+ },+ {+ "id": "minimax-speech-2.6-turbo",+ "name": "Minimax Speech Turbo",+ "endpoint": "minimax-speech-2.6-turbo",+ "family": "minimax-2.6",+ "description": "Speech-2.6-turbo is MinimaxΓÇÖs fast, lightweight text-to-speech model designed for quick audio generation while maintaining good natural voice quality. It produces clear speech with smooth pacing and minimal delay.",+ "required": [+ "prompt",+ "voice_id"+ ],+ "inputs": {+ "prompt": {+ "examples": [+ "Welcome to Minimax-Speech 2.6 by Muapiapp! Get ready for an audio revolution! We are thrilled to introduce a model so realistic, it's virtually indistinguishable from a human voice. You're going to be amazed by its lifelike delivery!"+ ],+ "description": "Text to convert to speech. Every character is 1 token. Maximum 10000 characters. Use <#x#> between words to control pause duration (0.01-99.99s).",+ "type": "string",+ "title": "Prompt",+ "name": "prompt"+ },+ "voice_id": {+ "enum": [+ "Wise_Woman",+ "Friendly_Person",+ "Inspirational_girl",+ "Deep_Voice_Man",+ "Calm_Woman",+ "Casual_Guy",+ "Lively_Girl",+ "Patient_Man",+ "Young_Knight",+ "Determined_Man",+ "Lovely_Girl",+ "Decent_Boy",+ "Imposing_Manner",+ "Elegant_Man",+ "Abbess",+ "Sweet_Girl_2",+ "Exuberant_Girl",+ "English_expressive_narrator",+ "English_radiant_girl",+ "English_magnetic_voiced_man",+ "English_compelling_lady1",+ "English_Aussie_Bloke",+ "English_captivating_female1",+ "English_Upbeat_Woman",+ "English_Trustworth_Man",+ "English_CalmWoman",+ "English_UpsetGirl",+ "English_Gentle-voiced_man",+ "English_Whispering_girl_v3",+ "English_Diligent_Man",+ "English_Graceful_Lady",+ "English_Husky_MetalHead",+ "English_ReservedYoungMan",+ "Thai_female_1_sample1",+ "Thai_female_2_sample2",+ "English_PlayfulGirl",+ "English_ManWithDeepVoice",+ "English_GentleTeacher",+ "English_MaturePartner",+ "English_FriendlyPerson",+ "English_MatureBoss",+ "English_Debator",+ "whisper_man",+ "English_Abbess",+ "English_LovelyGirl",+ "whisper_woman_1",+ "English_Steadymentor",+ "English_Deep-VoicedGentleman",+ "English_DeterminedMan",+ "English_Wiselady",+ "English_CaptivatingStoryteller",+ "English_AttractiveGirl",+ "English_DecentYoungMan",+ "English_SentimentalLady",+ "English_ImposingManner",+ "English_SadTeen",+ "English_ThoughtfulMan",+ "English_PassionateWarrior",+ "English_DecentBoy",+ "English_WiseScholar",+ "English_Soft-spokenGirl",+ "English_SereneWoman",+ "English_ConfidentWoman",+ "English_PatientMan",+ "English_Comedian",+ "English_GorgeousLady",+ "English_BossyLeader",+ "English_LovelyLady",+ "English_Strong-WilledBoy",+ "English_Deep-tonedMan",+ "English_StressedLady",+ "English_AssertiveQueen",+ "English_AnimeCharacter",+ "Portuguese_Optimisticyouth",+ "Portuguese_CuteElf",+ "English_Jovialman",+ "English_WhimsicalGirl",+ "English_CharmingQueen",+ "English_Kind-heartedGirl",+ "English_FriendlyNeighbor",+ "English_Sweet_Female_4",+ "English_Magnetic_Male_2",+ "English_Lively_Male_11",+ "English_Friendly_Female_3",+ "English_Steady_Female_1",+ "English_Lively_Male_10",+ "English_Magnetic_Male_12",+ "English_Steady_Female_5",+ "English_Insightful_Speaker",+ "English_patient_man_v1",+ "English_Persuasive_Man",+ "English_Explanatory_Man",+ "English_intellect_female_1",+ "English_Cute_Girl",+ "English_Sharp_Commentator",+ "English_Honest_Man",+ "angry_pirate_1",+ "massive_kind_troll",+ "movie_trailer_deep",+ "peace_and_ease",+ "moss_audio_6dc281eb-713c-11f0-a447-9613c873494c",+ "moss_audio_c12a59b9-7115-11f0-a447-9613c873494c",+ "moss_audio_076697ad-7144-11f0-a447-9613c873494c",+ "moss_audio_737a299c-734a-11f0-918f-4e0486034804",+ "moss_audio_19dbb103-7350-11f0-ad20-f2bc95e89150",+ "moss_audio_7c7e7ae2-7356-11f0-9540-7ef9b4b62566",+ "moss_audio_570551b1-735c-11f0-b236-0adeeecad052",+ "conversational_female_1_v1",+ "conversational_female_2_v1",+ "socialmedia_female_1_v1",+ "BritishChild_male_1_v1",+ "BritishChild_female_1_v1",+ "Chinese (Mandarin)_Reliable_Executive",+ "Chinese (Mandarin)_News_Anchor",+ "Chinese (Mandarin)_Unrestrained_Young_Man",+ "Chinese (Mandarin)_Mature_Woman",+ "Arrogant_Miss",+ "Chinese (Mandarin)_Kind-hearted_Antie",+ "Robot_Armor",+ "hunyin_6",+ "Chinese (Mandarin)_HK_Flight_Attendant",+ "Chinese (Mandarin)_Humorous_Elder",+ "Chinese (Mandarin)_Gentleman",+ "Chinese (Mandarin)_Warm_Bestie",+ "Chinese (Mandarin)_Southern_Young_Man",+ "Chinese (Mandarin)_Wise_Women",+ "moss_audio_cedfd4d2-736d-11f0-99be-fe40dd2a5fe8",+ "moss_audio_a0d611da-737c-11f0-ad20-f2bc95e89150",+ "moss_audio_4f4172f4-737b-11f0-9540-7ef9b4b62566",+ "moss_audio_62ca20b0-7380-11f0-99be-fe40dd2a5fe8",+ "Portuguese_PowerfulSoldier",+ "Portuguese_FascinatingBoy",+ "Portuguese_RomanticHusband",+ "Portuguese_StrictBoss",+ "Chinese (Mandarin)_Stubborn_Friend",+ "Chinese (Mandarin)_Sweet_Lady",+ "moss_audio_ad5baf92-735f-11f0-8263-fe5a2fe98ec8",+ "Chinese (Mandarin)_Gentle_Youth",+ "Chinese (Mandarin)_Warm_Girl",+ "Chinese (Mandarin)_Male_Announcer",+ "Chinese (Mandarin)_Kind-hearted_Elder",+ "Chinese (Mandarin)_Cute_Spirit",+ "Chinese (Mandarin)_Radio_Host",+ "Chinese (Mandarin)_Lyrical_Voice",+ "Chinese (Mandarin)_Straightforward_Boy",+ "Chinese (Mandarin)_Sincere_Adult",+ "Chinese (Mandarin)_Gentle_Senior",+ "Chinese (Mandarin)_Crisp_Girl",+ "Chinese (Mandarin)_Pure-hearted_Boy",+ "Chinese (Mandarin)_Soft_Girl",+ "Chinese (Mandarin)_IntellectualGirl",+ "Chinese (Mandarin)_Laid_BackGirl",+ "Chinese (Mandarin)_ExplorativeGirl",+ "Chinese (Mandarin)_Warm-HeartedAunt",+ "Chinese (Mandarin)_BashfulGirl",+ "Arabic_CalmWoman",+ "Arabic_FriendlyGuy",+ "Cantonese_ProfessionalHost∩╝êF)",+ "Cantonese_GentleLady",+ "Cantonese_ProfessionalHost∩╝êM)",+ "Cantonese_PlayfulMan",+ "Cantonese_CuteGirl",+ "Cantonese_KindWoman",+ "Cantonese_Narrator",+ "Cantonese_WiselProfessor",+ "Cantonese_IndifferentStaff",+ "Japanese_ColdQueen",+ "Japanese_DependableWoman",+ "Japanese_GentleButler",+ "Japanese_KindLady",+ "Dutch_kindhearted_girl",+ "Dutch_bossy_leader",+ "French_Male_Speech_New",+ "French_Female_News Anchor",+ "French_CasualMan",+ "French_MovieLeadFemale",+ "French_FemaleAnchor",+ "French_MaleNarrator",+ "French_Female Journalist",+ "French_Female_Speech_New",+ "German_FriendlyMan",+ "German_SweetLady",+ "German_PlayfulMan",+ "Indonesian_SweetGirl",+ "Indonesian_ReservedYoungMan",+ "Indonesian_CharmingGirl",+ "Russian_AmbitiousWoman",+ "Russian_ReliableMan",+ "Russian_CrazyQueen",+ "Russian_PessimisticGirl",+ "Indonesian_CalmWoman",+ "Indonesian_ConfidentWoman",+ "Indonesian_CaringMan",+ "Indonesian_BossyLeader",+ "Indonesian_DeterminedBoy",+ "Indonesian_GentleGirl",+ "Italian_BraveHeroine",+ "Italian_Narrator",+ "Italian_WanderingSorcerer",+ "Italian_DiligentLeader",+ "Italian_ReliableMan",+ "Italian_AthleticStudent",+ "Italian_ArrogantPrincess",+ "Japanese_Whisper_Belle",+ "Japanese_IntellectualSenior",+ "Japanese_DecisivePrincess",+ "Japanese_LoyalKnight",+ "Japanese_DominantMan",+ "Japanese_SeriousCommander",+ "Japanese_CalmLady",+ "Japanese_OptimisticYouth",+ "Japanese_GenerousIzakayaOwner",+ "Japanese_SportyStudent",+ "Japanese_InnocentBoy",+ "Japanese_GracefulMaiden",+ "Korean_PowerfulGirl",+ "Korean_BossyMan",+ "Korean_SweetGirl",+ "Korean_CheerfulBoyfriend",+ "Korean_EnchantingSister",+ "Korean_ShyGirl",+ "Korean_ReliableSister",+ "Korean_StrictBoss",+ "Korean_SassyGirl",+ "Korean_ChildhoodFriendGirl",+ "Korean_PlayboyCharmer",+ "Korean_ElegantPrincess",+ "English_energetic_male_1",+ "English_witty_female_1",+ "English_Lucky_Robot",+ "Korean_BraveFemaleWarrior",+ "Korean_BraveYouth",+ "Korean_CalmLady",+ "Korean_EnthusiasticTeen",+ "Korean_SoothingLady",+ "Korean_IntellectualSenior",+ "Korean_LonelyWarrior",+ "Korean_MatureLady",+ "Korean_InnocentBoy",+ "Korean_CharmingSister",+ "Korean_AthleticStudent",+ "Korean_BraveAdventurer",+ "Korean_CalmGentleman",+ "Korean_WiseElf",+ "Korean_CheerfulCoolJunior",+ "Korean_DecisiveQueen",+ "Korean_ColdYoungMan",+ "Korean_MysteriousGirl",+ "Korean_QuirkyGirl",+ "Korean_ConsiderateSenior",+ "Chinese (Mandarin)_Warm_HeartedGirl",+ "Korean_CheerfulLittleSister",+ "Korean_DominantMan",+ "Korean_AirheadedGirl",+ "Korean_ReliableYouth",+ "Korean_FriendlyBigSister",+ "Korean_GentleBoss",+ "Korean_ColdGirl",+ "Korean_HaughtyLady",+ "Korean_CharmingElderSister",+ "Korean_IntellectualMan",+ "Korean_CaringWoman",+ "Korean_WiseTeacher",+ "Korean_ConfidentBoss",+ "Korean_AthleticGirl",+ "Korean_PossessiveMan",+ "Korean_GentleWoman",+ "Korean_CockyGuy",+ "Korean_ThoughtfulWoman",+ "Korean_OptimisticYouth",+ "Portuguese_AnxiousMan",+ "Portuguese_Matureresearcher",+ "Portuguese_EnergeticGirl",+ "Portuguese_FunnyGuy",+ "Portuguese_Nuttylady",+ "Portuguese_Deep-tonedMan",+ "Portuguese_SentimentalLady",+ "Portuguese_BossyLeader",+ "Portuguese_Wiselady",+ "Portuguese_Strong-WilledBoy",+ "Portuguese_Deep-VoicedGentleman",+ "Portuguese_UpsetGirl",+ "Portuguese_PassionateWarrior",+ "Portuguese_AnimeCharacter",+ "Portuguese_ConfidentWoman",+ "Portuguese_AngryMan",+ "Portuguese_CaptivatingStoryteller",+ "Portuguese_Godfather",+ "Portuguese_ReservedYoungMan",+ "Portuguese_SmartYoungGirl",+ "Portuguese_Kind-heartedGirl",+ "Portuguese_Pompouslady",+ "Portuguese_Grinch",+ "Portuguese_Debator",+ "Portuguese_SweetGirl",+ "Portuguese_AttractiveGirl",+ "Portuguese_ThoughtfulMan",+ "Portuguese_PlayfulGirl",+ "Portuguese_GorgeousLady",+ "Portuguese_LovelyLady",+ "Portuguese_SereneWoman",+ "Portuguese_SadTeen",+ "Portuguese_MaturePartner",+ "Portuguese_Comedian",+ "Portuguese_NaughtySchoolgirl",+ "Portuguese_Narrator",+ "Portuguese_ToughBoss",+ "Portuguese_Fussyhostess",+ "Portuguese_Dramatist",+ "Portuguese_Steadymentor",+ "Portuguese_Jovialman",+ "Portuguese_CharmingQueen",+ "Portuguese_SantaClaus",+ "Portuguese_Rudolph",+ "Portuguese_Arnold",+ "Portuguese_CharmingSanta",+ "Portuguese_Ghost",+ "Portuguese_HumorousElder",+ "Portuguese_CalmLeader",+ "Portuguese_GentleTeacher",+ "Portuguese_EnergeticBoy",+ "Portuguese_ReliableMan",+ "Portuguese_SereneElder",+ "Portuguese_GrimReaper",+ "Portuguese_AssertiveQueen",+ "Portuguese_WhimsicalGirl",+ "Portuguese_StressedLady",+ "Portuguese_FriendlyNeighbor",+ "Portuguese_CaringGirlfriend",+ "Portuguese_InspiringLady",+ "Portuguese_PlayfulSpirit",+ "Portuguese_ElegantGirl",+ "Portuguese_CompellingGirl",+ "Portuguese_PowerfulVeteran",+ "Portuguese_SensibleManager",+ "Portuguese_ThoughtfulLady",+ "Portuguese_TheatricalActor",+ "Portuguese_FragileBoy",+ "Portuguese_ChattyGirl",+ "Portuguese_Conscientiousinstructor",+ "Portuguese_RationalMan",+ "Portuguese_WiseScholar",+ "Portuguese_FrankLady",+ "Portuguese_DeterminedManager",+ "Portuguese_CharmingLady",+ "Russian_HandsomeChildhoodFriend",+ "Russian_BrightHeroine",+ "Russian_AttractiveGuy",+ "Russian_Bad-temperedBoy",+ "Spanish_FriendlyNeighbor",+ "Spanish_FragileBoy",+ "Spanish_UpsetGirl",+ "Spanish_Soft-spokenGirl",+ "Spanish_CharmingQueen",+ "Spanish_Nuttylady",+ "Spanish_ElegantGirl",+ "Spanish_FascinatingBoy",+ "Spanish_FunnyGuy",+ "Spanish_PlayfulSpirit",+ "Spanish_TheatricalActor",+ "Spanish_SereneWoman",+ "Spanish_MaturePartner",+ "Spanish_CaptivatingStoryteller",+ "Spanish_Narrator",+ "Spanish_WiseScholar",+ "Spanish_Kind-heartedGirl",+ "Spanish_DeterminedManager",+ "Spanish_BossyLeader",+ "Spanish_ReservedYoungMan",+ "Spanish_ConfidentWoman",+ "Spanish_ThoughtfulMan",+ "Spanish_Strong-WilledBoy",+ "Spanish_SophisticatedLady",+ "Spanish_RationalMan",+ "Spanish_AnimeCharacter",+ "Spanish_Deep-tonedMan",+ "Spanish_Fussyhostess",+ "Spanish_SincereTeen",+ "Spanish_FrankLady",+ "Spanish_Comedian",+ "Spanish_Debator",+ "Spanish_ToughBoss",+ "Spanish_Wiselady",+ "Spanish_Steadymentor",+ "finnish_male_1_v2",+ "hindi_male_1_v2",+ "hindi_female_2_v1",+ "hindi_female_1_v2",+ "Spanish_Jovialman",+ "Spanish_SantaClaus",+ "Spanish_Rudolph",+ "Spanish_Intonategirl",+ "Spanish_Arnold",+ "Spanish_Ghost",+ "Spanish_HumorousElder",+ "Spanish_EnergeticBoy",+ "Spanish_WhimsicalGirl",+ "Spanish_StrictBoss",+ "Spanish_ReliableMan",+ "Spanish_SereneElder",+ "Spanish_AngryMan",+ "Spanish_AssertiveQueen",+ "Spanish_CaringGirlfriend",+ "Spanish_PowerfulSoldier",+ "Spanish_PassionateWarrior",+ "Spanish_ChattyGirl",+ "Spanish_RomanticHusband",+ "Spanish_CompellingGirl",+ "Spanish_PowerfulVeteran",+ "Spanish_SensibleManager",+ "Spanish_ThoughtfulLady",+ "Turkish_CalmWoman",+ "Turkish_Trustworthyman",+ "Ukrainian_CalmWoman",+ "Ukrainian_WiseScholar",+ "Vietnamese_Serene_Man",+ "Vietnamese_female_4_v1",+ "Vietnamese_male_1_v2",+ "Vietnamese_kindhearted_girl",+ "Thai_Optimistic_girl",+ "Thai_male_1_sample8",+ "Thai_Tender_Woman",+ "Thai_male_2_sample2",+ "Polish_male_1_sample4",+ "Polish_male_2_sample3",+ "Polish_female_1_sample1",+ "Polish_female_2_sample3",+ "Romanian_male_1_sample2",+ "Romanian_male_2_sample1",+ "Romanian_female_1_sample4",+ "Romanian_female_2_sample1",+ "Greek_female_1_sample1",+ "greek_male_1a_v1",+ "Greek_female_2_sample3",+ "czech_male_1_v1",+ "czech_female_5_v7",+ "czech_female_2_v2",+ "finnish_male_3_v1",+ "finnish_female_4_v1",+ "Bulgarian_male_2_v1",+ "Bulgarian_female_1_v1",+ "Danish_male_1_v1",+ "Danish_female_1_v1",+ "Hebrew_male_1_v1",+ "Hebrew_female_1_v1",+ "Malay_male_1_v1",+ "Malay_female_1_v1",+ "Malay_female_2_v1",+ "Persian_male_1_v1",+ "Persian_female_1_v1",+ "Slovak_male_1_v1",+ "Slovak_female_1_v1",+ "Swedish_male_1_v1",+ "Swedish_female_1_v1",+ "Croatian_male_1_v1",+ "Croatian_female_1_v1",+ "Filipino_male_1_v1",+ "Filipino_female_1_v1",+ "Hungarian_male_1_v1",+ "Hungarian_female_1_v1",+ "Norwegian_male_1_v1",+ "Norwegian_female_1_v1",+ "Slovenian_male_1_v1",+ "Slovenian_female_1_v2",+ "Catalan_male_1_v1",+ "Catalan_female_1_v1",+ "Nynorsk_male_1_v1",+ "Nynorsk_female_1_v1",+ "Tamil_male_1_v1",+ "Tamil_female_1_v1",+ "Afrikaans_male_1_v1",+ "Afrikaans_female_1_v1"+ ],+ "description": "Desired voice ID. Use a voice ID you have trained (https://muapi.ai/playground/minimax-voice-clone), or one of the following system voice IDs",+ "type": "string",+ "typing": true,+ "title": "Voice ID",+ "name": "voice_id",+ "default": "Friendly_Person"+ },+ "speed": {+ "title": "Speed",+ "name": "speed",+ "type": "int",+ "description": "Speech speed. Range: 0.5-2.0, where 1.0 is normal speed.",+ "default": 1,+ "minValue": 0.5,+ "maxValue": 2,+ "step": 0.01+ },+ "volume": {+ "title": "Volume",+ "name": "volume",+ "type": "int",+ "description": "Speech volume. Range: 0.1-10.0, where 1.0 is normal volume.",+ "default": 1,+ "minValue": 0.1,+ "maxValue": 10,+ "step": 0.01+ },+ "pitch": {+ "title": "Pitch",+ "name": "pitch",+ "type": "int",+ "description": "Speech pitch. Range: -12 to 12, where 0 is normal pitch.",+ "default": 0,+ "minValue": -12,+ "maxValue": 12,+ "step": 1+ },+ "emotion": {+ "enum": [+ "happy",+ "sad",+ "angry",+ "fearful",+ "disgusted",+ "surprised",+ "neutral"+ ],+ "title": "Emotion",+ "name": "emotion",+ "type": "string",+ "description": "The emotion of the generated speech.",+ "default": "surprised"+ },+ "english_normalization": {+ "type": "boolean",+ "title": "English Normalization",+ "name": "english_normalization",+ "description": "This parameter supports English text normalization, which improves performance in number-reading scenarios.",+ "default": false+ },+ "sample_rate": {+ "enum": [+ 8000,+ 16000,+ 22050,+ 24000,+ 32000,+ 44100+ ],+ "type": "integer",+ "title": "Sample Rate",+ "name": "sample_rate",+ "description": "Sample rate of generated sound.",+ "default": 8000+ },+ "bitrate": {+ "enum": [+ 32000,+ 64000,+ 128000,+ 256000+ ],+ "type": "integer",+ "title": "Bitrate",+ "name": "bitrate",+ "description": "Bitrate of generated sound.",+ "default": 32000+ },+ "channel": {+ "enum": [+ 1,+ 2+ ],+ "type": "integer",+ "title": "Channel",+ "name": "channel",+ "description": "he number of channels of the generated audio. 1: mono, 2: stereo.",+ "default": 1+ },+ "format": {+ "enum": [+ "mp3",+ "wav",+ "pcm",+ "flac"+ ],+ "type": "string",+ "title": "Format",+ "name": "format",+ "description": "Format of generated sound.",+ "default": "mp3"+ },+ "language_boost": {+ "enum": [+ "Chinese",+ "Chinese,Yue",+ "English",+ "Arabic",+ "Russian",+ "Spanish",+ "French",+ "Portuguese",+ "German",+ "Turkish",+ "Dutch",+ "Ukrainian",+ "Vietnamese",+ "Indonesian",+ "Japanese",+ "Italian",+ "Korean",+ "Thai",+ "Polish",+ "Romanian",+ "Greek",+ "Czech",+ "Finnish",+ "Hindi",+ "Bulgarian",+ "Danish",+ "Hebrew",+ "Malay",+ "Persian",+ "Slovak",+ "Swedish",+ "Croatian",+ "Filipino",+ "Hungarian",+ "Norwegian",+ "Slovenian",+ "Catalan",+ "Nynorsk",+ "Tamil",+ "Afrikaans",+ "auto"+ ],+ "title": "Language Boost",+ "name": "language_boost",+ "type": "string",+ "description": "Enhance the ability to recognize specified languages and dialects.",+ "default": "auto"+ }+ }+ },{+ "id": "mmaudio-v2-text-to-audio",+ "name": "MM Audio V2",+ "endpoint": "mmaudio-v2/text-to-audio",+ "family": "mmaudio",+ "description": "Convert text into natural-sounding speech using mmAudio-v2. Ideal for voiceovers, virtual assistants, and content narration with lifelike clarity and tone.",+ "required": [+ "prompt"+ ],+ "inputs": {+ "prompt": {+ "examples": [+ "Indian holy music"+ ],+ "description": "The prompt to generate the audio for.",+ "type": "string",+ "title": "Prompt",+ "name": "prompt"+ },+ "duration": {+ "title": "Duration",+ "name": "duration",+ "type": "int",+ "description": "The duration of the audio to generate.",+ "default": 8,+ "minValue": 1,+ "maxValue": 30,+ "step": 1+ }+ }+ }+];++export const getAudioModelById = (id) => audioModels.find(m => m.id === id);diff --git a/packages/studio/src/muapi.js b/packages/studio/src/muapi.jsindex 67c0644d..3c31ffc2 100644--- a/packages/studio/src/muapi.js+++ b/packages/studio/src/muapi.js@@ -1,4 +1,4 @@-import { getModelById, getVideoModelById, getI2IModelById, getI2VModelById, getV2VModelById, getLipSyncModelById } from './models.js';+import { getModelById, getVideoModelById, getI2IModelById, getI2VModelById, getV2VModelById, getLipSyncModelById, getAudioModelById } from './models.js';// In an http(s) browser we route through the host app's proxy (Next.js routes// under /api/* re-issue the call server-side) so api.muapi.ai CORS is bypassed.@@ -177,6 +177,19 @@ export async function processLipSync(apiKey, params) {return submitAndPoll(endpoint, payload, apiKey, params.onRequestId, 900);}+export async function generateAudio(apiKey, params) {+ const modelInfo = getAudioModelById(params.model);+ const endpoint = modelInfo?.endpoint || params.model;+ const payload = {};+ const skipKeys = ['model', 'onRequestId'];+ for (const key in params) {+ if (!skipKeys.includes(key) && params[key] !== undefined && params[key] !== null) {+ payload[key] = params[key];+ }+ }+ return submitAndPoll(endpoint, payload, apiKey, params.onRequestId, 900);+}+export function uploadFile(apiKey, file, onProgress) {return new Promise((resolve, reject) => {const url = `${BASE_URL}/api/v1/upload_file`;