Skip to content

The open-source AI voice studio. Clone, dictate, create.

Refactor useGenerationForm to streamline model download handling

Jamie Pineb39f48cc81af
diff --git a/app/src/lib/hooks/useGenerationForm.ts b/app/src/lib/hooks/useGenerationForm.ts
index 2126d90d..c6fdba50 100644
--- a/app/src/lib/hooks/useGenerationForm.ts
+++ b/app/src/lib/hooks/useGenerationForm.ts
@@ -70,7 +70,6 @@ export function useGenerationForm(options: UseGenerationFormOptions = {}) {
const modelName = `qwen-tts-${data.modelSize}`;
const displayName = data.modelSize === '1.7B' ? 'Qwen TTS 1.7B' : 'Qwen TTS 0.6B';
- let isDownloading = false;
try {
const modelStatus = await apiClient.getModelStatus();
const model = modelStatus.models.find((m) => m.model_name === modelName);
@@ -78,7 +77,6 @@ export function useGenerationForm(options: UseGenerationFormOptions = {}) {
if (model && !model.downloaded) {
setDownloadingModelName(modelName);
setDownloadingDisplayName(displayName);
- isDownloading = true;
}
} catch (error) {
console.error('Failed to check model status:', error);
@@ -103,21 +101,16 @@ export function useGenerationForm(options: UseGenerationFormOptions = {}) {
form.reset();
options.onSuccess?.(result.id);
-
- if (isDownloading) {
- setDownloadingModelName(null);
- setDownloadingDisplayName(null);
- }
} catch (error) {
toast({
title: 'Generation failed',
description: error instanceof Error ? error.message : 'Failed to generate audio',
variant: 'destructive',
});
- setDownloadingModelName(null);
- setDownloadingDisplayName(null);
} finally {
setIsGenerating(false);
+ setDownloadingModelName(null);
+ setDownloadingDisplayName(null);
}
}
diff --git a/docs/nixpacks.toml b/docs/nixpacks.toml
new file mode 100644
index 00000000..5cb001d9
--- /dev/null
+++ b/docs/nixpacks.toml
@@ -0,0 +1,11 @@
+[phases.setup]
+nixPkgs = ["nodejs_20", "bun"]
+
+[phases.install]
+cmds = ["bun install"]
+
+[phases.build]
+cmds = ["bun run build"]
+
+[start]
+cmd = "bun run start"
diff --git a/docs/package.json b/docs/package.json
index e21c43ed..6d177bd9 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -4,6 +4,8 @@
"private": true,
"scripts": {
"dev": "mintlify dev",
+ "build": "mintlify build",
+ "start": "mintlify serve",
"install:mintlify": "bun add -g mintlify"
},
"devDependencies": {
diff --git a/landing/src/app/page.tsx b/landing/src/app/page.tsx
index aedd6fd3..be4869f3 100644
--- a/landing/src/app/page.tsx
+++ b/landing/src/app/page.tsx
@@ -228,6 +228,29 @@ export default function Home() {
</div>
</section>
+ {/* Description Section */}
+ <section className="py-12 sm:py-16 md:py-20">
+ <div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-4xl">
+ <h2 className="text-3xl sm:text-4xl md:text-5xl font-bold text-center mb-6 sm:mb-8">
+ What is Voicebox?
+ </h2>
+ <div className="space-y-6 text-lg text-foreground/80 text-center">
+ <p>
+ Voicebox is a <strong>local-first voice cloning studio</strong> with DAW-like features
+ for professional voice synthesis. Think of it as the <strong>Ollama for voice</strong>{' '}
+ — download models, clone voices, and generate speech entirely on your machine.
+ </p>
+ <p>
+ Unlike cloud services that lock your voice data behind subscriptions, Voicebox gives
+ you complete privacy, professional tools, and native performance. Download a voice
+ model, clone any voice from a few seconds of audio, and compose multi-voice projects
+ with studio-grade editing tools.
+ </p>
+ <p className="text-foreground/60">No Python install required.</p>
+ </div>
+ </div>
+ </section>
+
{/* Demo Video Section */}
<section className="py-12 sm:py-16 md:py-20">
<div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl">