Spaces:
Running
Running
Added elevnlabs fixing build issues
Browse files- app/components/VoiceApp.tsx +5 -5
- mcp-server.js +8 -8
app/components/VoiceApp.tsx
CHANGED
|
@@ -52,20 +52,20 @@ export function VoiceApp({ onClose, onMinimize, onMaximize, onFocus, zIndex }: V
|
|
| 52 |
|
| 53 |
const loadContent = async () => {
|
| 54 |
try {
|
| 55 |
-
//
|
| 56 |
-
const passkey =
|
| 57 |
|
| 58 |
// Load from server
|
| 59 |
const response = await fetch(`/api/voice/save?passkey=${passkey}`)
|
| 60 |
if (response.ok) {
|
| 61 |
const data = await response.json()
|
| 62 |
-
if (data.success
|
| 63 |
-
setVoiceContents(data.content)
|
| 64 |
return
|
| 65 |
}
|
| 66 |
}
|
| 67 |
|
| 68 |
-
// Fallback to localStorage
|
| 69 |
const saved = localStorage.getItem('voice-app-contents')
|
| 70 |
if (saved) {
|
| 71 |
const parsed = JSON.parse(saved)
|
|
|
|
| 52 |
|
| 53 |
const loadContent = async () => {
|
| 54 |
try {
|
| 55 |
+
// Use default 'demo' passkey for all users
|
| 56 |
+
const passkey = 'demo'
|
| 57 |
|
| 58 |
// Load from server
|
| 59 |
const response = await fetch(`/api/voice/save?passkey=${passkey}`)
|
| 60 |
if (response.ok) {
|
| 61 |
const data = await response.json()
|
| 62 |
+
if (data.success) {
|
| 63 |
+
setVoiceContents(data.content || [])
|
| 64 |
return
|
| 65 |
}
|
| 66 |
}
|
| 67 |
|
| 68 |
+
// Fallback to localStorage if server fails
|
| 69 |
const saved = localStorage.getItem('voice-app-contents')
|
| 70 |
if (saved) {
|
| 71 |
const parsed = JSON.parse(saved)
|
mcp-server.js
CHANGED
|
@@ -198,7 +198,7 @@ class ReubenOSMCPServer {
|
|
| 198 |
description: 'Your passkey for authentication',
|
| 199 |
},
|
| 200 |
},
|
| 201 |
-
required: ['title', 'style', 'lyrics'
|
| 202 |
},
|
| 203 |
},
|
| 204 |
{
|
|
@@ -220,7 +220,7 @@ class ReubenOSMCPServer {
|
|
| 220 |
description: 'Your passkey for authentication',
|
| 221 |
},
|
| 222 |
},
|
| 223 |
-
required: ['title', 'content'
|
| 224 |
},
|
| 225 |
},
|
| 226 |
],
|
|
@@ -575,11 +575,11 @@ class ReubenOSMCPServer {
|
|
| 575 |
|
| 576 |
async generateSongAudio(args) {
|
| 577 |
try {
|
| 578 |
-
const { title, style, lyrics, passkey } = args;
|
| 579 |
|
| 580 |
-
if (!title || !style || !lyrics
|
| 581 |
return {
|
| 582 |
-
content: [{ type: 'text', text: '❌ title, style,
|
| 583 |
};
|
| 584 |
}
|
| 585 |
|
|
@@ -624,11 +624,11 @@ class ReubenOSMCPServer {
|
|
| 624 |
|
| 625 |
async generateStoryAudio(args) {
|
| 626 |
try {
|
| 627 |
-
const { title, content, passkey } = args;
|
| 628 |
|
| 629 |
-
if (!title || !content
|
| 630 |
return {
|
| 631 |
-
content: [{ type: 'text', text: '❌ title
|
| 632 |
};
|
| 633 |
}
|
| 634 |
|
|
|
|
| 198 |
description: 'Your passkey for authentication',
|
| 199 |
},
|
| 200 |
},
|
| 201 |
+
required: ['title', 'style', 'lyrics'],
|
| 202 |
},
|
| 203 |
},
|
| 204 |
{
|
|
|
|
| 220 |
description: 'Your passkey for authentication',
|
| 221 |
},
|
| 222 |
},
|
| 223 |
+
required: ['title', 'content'],
|
| 224 |
},
|
| 225 |
},
|
| 226 |
],
|
|
|
|
| 575 |
|
| 576 |
async generateSongAudio(args) {
|
| 577 |
try {
|
| 578 |
+
const { title, style, lyrics, passkey = 'demo' } = args;
|
| 579 |
|
| 580 |
+
if (!title || !style || !lyrics) {
|
| 581 |
return {
|
| 582 |
+
content: [{ type: 'text', text: '❌ title, style, and lyrics are required' }],
|
| 583 |
};
|
| 584 |
}
|
| 585 |
|
|
|
|
| 624 |
|
| 625 |
async generateStoryAudio(args) {
|
| 626 |
try {
|
| 627 |
+
const { title, content, passkey = 'demo' } = args;
|
| 628 |
|
| 629 |
+
if (!title || !content) {
|
| 630 |
return {
|
| 631 |
+
content: [{ type: 'text', text: '❌ title and content are required' }],
|
| 632 |
};
|
| 633 |
}
|
| 634 |
|