diff --git a/.github/ISSUE_TEMPLATE/elusoc_bug_report.md b/.github/ISSUE_TEMPLATE/elusoc_bug_report.md index a504a9a1..37a26b6d 100644 --- a/.github/ISSUE_TEMPLATE/elusoc_bug_report.md +++ b/.github/ISSUE_TEMPLATE/elusoc_bug_report.md @@ -6,15 +6,19 @@ labels: "" --- ## ๐Ÿš€ Program + ELUSOC ## ๐Ÿ› Describe the bug + A clear and concise description of what the bug is. --- ## ๐Ÿ” Steps to Reproduce + Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '...' 3. Scroll to '...' @@ -23,21 +27,25 @@ Steps to reproduce the behavior: --- ## โœ… Expected Behavior + A clear and concise description of what you expected to happen. --- ## โŒ Actual Behavior + What actually happens instead. --- ## ๐Ÿ“ธ Screenshots + If applicable, add screenshots to help explain your problem. --- ## ๐ŸŒฑ Contributor Checklist + - [ ] I am participating via ELUSOC - [ ] I have read the contribution guidelines - [ ] I checked for existing issues before creating this @@ -45,6 +53,7 @@ If applicable, add screenshots to help explain your problem. --- ## ๐Ÿ’ป Environment + - Browser: (e.g. Chrome, Firefox) - Device: (e.g. Desktop, Mobile) - OS: (e.g. Windows, macOS) @@ -52,4 +61,5 @@ If applicable, add screenshots to help explain your problem. --- ## ๐Ÿ“ Additional Context + Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/elusoc_feature_request.md b/.github/ISSUE_TEMPLATE/elusoc_feature_request.md index 0306eb0a..2fe78bb9 100644 --- a/.github/ISSUE_TEMPLATE/elusoc_feature_request.md +++ b/.github/ISSUE_TEMPLATE/elusoc_feature_request.md @@ -7,32 +7,42 @@ assignees: "" --- ## ๐Ÿš€ Program + ELUSOC ## โœจ Feature Description + ## ๐Ÿค” Problem It Solves + ## ๐Ÿ’ก Proposed Solution + ## ๐Ÿ”„ Alternatives Considered + ## ๐Ÿ“ธ Mockups / Examples + ## โœ… Acceptance Criteria + + - [ ] ... - [ ] ... ## ๐Ÿ“‹ Additional Context + ## ๐ŸŒฑ Contributor Checklist + - [ ] I am participating via ELUSOC - [ ] I have read the contribution guidelines - [ ] I checked for existing issues before creating this diff --git a/.github/ISSUE_TEMPLATE/gssoc_bug_report.md b/.github/ISSUE_TEMPLATE/gssoc_bug_report.md index b0042d29..7292ad5e 100644 --- a/.github/ISSUE_TEMPLATE/gssoc_bug_report.md +++ b/.github/ISSUE_TEMPLATE/gssoc_bug_report.md @@ -6,15 +6,19 @@ labels: "" --- ## ๐Ÿš€ Program + GSSoC ## ๐Ÿ› Describe the bug + A clear and concise description of what the bug is. --- ## ๐Ÿ” Steps to Reproduce + Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '...' 3. Scroll to '...' @@ -23,21 +27,25 @@ Steps to reproduce the behavior: --- ## โœ… Expected Behavior + A clear and concise description of what you expected to happen. --- ## โŒ Actual Behavior + What actually happens instead. --- ## ๐Ÿ“ธ Screenshots + If applicable, add screenshots to help explain your problem. --- ## ๐ŸŒฑ Contributor Checklist + - [ ] I am participating via GSSoC - [ ] I have read the contribution guidelines - [ ] I checked for existing issues before creating this @@ -45,6 +53,7 @@ If applicable, add screenshots to help explain your problem. --- ## ๐Ÿ’ป Environment + - Browser: (e.g. Chrome, Firefox) - Device: (e.g. Desktop, Mobile) - OS: (e.g. Windows, macOS) @@ -52,4 +61,5 @@ If applicable, add screenshots to help explain your problem. --- ## ๐Ÿ“ Additional Context + Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/gssoc_feature_request.md b/.github/ISSUE_TEMPLATE/gssoc_feature_request.md index 752158d7..5b72ed3f 100644 --- a/.github/ISSUE_TEMPLATE/gssoc_feature_request.md +++ b/.github/ISSUE_TEMPLATE/gssoc_feature_request.md @@ -7,32 +7,42 @@ assignees: "" --- ## ๐Ÿš€ Program + GSSoC ## โœจ Feature Description + ## ๐Ÿค” Problem It Solves + ## ๐Ÿ’ก Proposed Solution + ## ๐Ÿ”„ Alternatives Considered + ## ๐Ÿ“ธ Mockups / Examples + ## โœ… Acceptance Criteria + + - [ ] ... - [ ] ... ## ๐Ÿ“‹ Additional Context + ## ๐ŸŒฑ Contributor Checklist + - [ ] I am participating via GSSoC - [ ] I have read the contribution guidelines - [ ] I checked for existing issues before creating this diff --git a/.github/ISSUE_TEMPLATE/nsoc_bug_report.md b/.github/ISSUE_TEMPLATE/nsoc_bug_report.md index 1e21c530..96f33746 100644 --- a/.github/ISSUE_TEMPLATE/nsoc_bug_report.md +++ b/.github/ISSUE_TEMPLATE/nsoc_bug_report.md @@ -6,15 +6,19 @@ labels: "" --- ## ๐Ÿš€ Program + NSOC ## ๐Ÿ› Describe the bug + A clear and concise description of what the bug is. --- ## ๐Ÿ” Steps to Reproduce + Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '...' 3. Scroll to '...' @@ -23,21 +27,25 @@ Steps to reproduce the behavior: --- ## โœ… Expected Behavior + A clear and concise description of what you expected to happen. --- ## โŒ Actual Behavior + What actually happens instead. --- ## ๐Ÿ“ธ Screenshots + If applicable, add screenshots to help explain your problem. --- ## ๐ŸŒฑ Contributor Checklist + - [ ] I am participating via NSOC - [ ] I have read the contribution guidelines - [ ] I checked for existing issues before creating this @@ -45,6 +53,7 @@ If applicable, add screenshots to help explain your problem. --- ## ๐Ÿ’ป Environment + - Browser: (e.g. Chrome, Firefox) - Device: (e.g. Desktop, Mobile) - OS: (e.g. Windows, macOS) @@ -52,4 +61,5 @@ If applicable, add screenshots to help explain your problem. --- ## ๐Ÿ“ Additional Context + Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/nsoc_feature_request.md b/.github/ISSUE_TEMPLATE/nsoc_feature_request.md index f288a931..003b83e9 100644 --- a/.github/ISSUE_TEMPLATE/nsoc_feature_request.md +++ b/.github/ISSUE_TEMPLATE/nsoc_feature_request.md @@ -7,32 +7,42 @@ assignees: "" --- ## ๐Ÿš€ Program + NSOC ## โœจ Feature Description + ## ๐Ÿค” Problem It Solves + ## ๐Ÿ’ก Proposed Solution + ## ๐Ÿ”„ Alternatives Considered + ## ๐Ÿ“ธ Mockups / Examples + ## โœ… Acceptance Criteria + + - [ ] ... - [ ] ... ## ๐Ÿ“‹ Additional Context + ## ๐ŸŒฑ Contributor Checklist + - [ ] I am participating via NSOC - [ ] I have read the contribution guidelines - [ ] I checked for existing issues before creating this diff --git a/.github/ISSUE_TEMPLATE/ssoc_bug_report.md b/.github/ISSUE_TEMPLATE/ssoc_bug_report.md index b0a668c9..55328b64 100644 --- a/.github/ISSUE_TEMPLATE/ssoc_bug_report.md +++ b/.github/ISSUE_TEMPLATE/ssoc_bug_report.md @@ -6,15 +6,19 @@ labels: "" --- ## ๐Ÿš€ Program + SSOC ## ๐Ÿ› Describe the bug + A clear and concise description of what the bug is. --- ## ๐Ÿ” Steps to Reproduce + Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '...' 3. Scroll to '...' @@ -23,21 +27,25 @@ Steps to reproduce the behavior: --- ## โœ… Expected Behavior + A clear and concise description of what you expected to happen. --- ## โŒ Actual Behavior + What actually happens instead. --- ## ๐Ÿ“ธ Screenshots + If applicable, add screenshots to help explain your problem. --- ## ๐ŸŒฑ Contributor Checklist + - [ ] I am participating via SSOC - [ ] I have read the contribution guidelines - [ ] I checked for existing issues before creating this @@ -45,6 +53,7 @@ If applicable, add screenshots to help explain your problem. --- ## ๐Ÿ’ป Environment + - Browser: (e.g. Chrome, Firefox) - Device: (e.g. Desktop, Mobile) - OS: (e.g. Windows, macOS) @@ -52,4 +61,5 @@ If applicable, add screenshots to help explain your problem. --- ## ๐Ÿ“ Additional Context + Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/ssoc_feature_request.md b/.github/ISSUE_TEMPLATE/ssoc_feature_request.md index 15bc2976..fca299cf 100644 --- a/.github/ISSUE_TEMPLATE/ssoc_feature_request.md +++ b/.github/ISSUE_TEMPLATE/ssoc_feature_request.md @@ -7,32 +7,42 @@ assignees: "" --- ## ๐Ÿš€ Program + SSOC ## โœจ Feature Description + ## ๐Ÿค” Problem It Solves + ## ๐Ÿ’ก Proposed Solution + ## ๐Ÿ”„ Alternatives Considered + ## ๐Ÿ“ธ Mockups / Examples + ## โœ… Acceptance Criteria + + - [ ] ... - [ ] ... ## ๐Ÿ“‹ Additional Context + ## ๐ŸŒฑ Contributor Checklist + - [ ] I am participating via SSOC - [ ] I have read the contribution guidelines - [ ] I checked for existing issues before creating this diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index caf3bb95..44343785 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,14 +1,19 @@ ## ๐Ÿš€ Program + ## ๐Ÿ“ Description + ## ๐Ÿ”— Related Issue + Closes # ## ๐Ÿ”„ Type of Change + + - [ ] ๐Ÿ› Bug fix - [ ] โœจ New feature - [ ] ๐Ÿ” SEO improvement @@ -19,14 +24,18 @@ Closes # - [ ] ๐Ÿงน Refactor / cleanup ## ๐Ÿงช How to Test + + 1. Open `http://localhost:5173` in a browser 2. ... ## ๐Ÿ“ธ Screenshots (if applicable) + ## โœ… Checklist + - [ ] I am contributing under GSSoC, NSOC, SSOC, or ELUSOC - [ ] My code follows the project's existing style - [ ] I have tested my changes in a browser diff --git a/.github/PULL_REQUEST_TEMPLATE/elusoc.md b/.github/PULL_REQUEST_TEMPLATE/elusoc.md index 626a789e..5675b8a4 100644 --- a/.github/PULL_REQUEST_TEMPLATE/elusoc.md +++ b/.github/PULL_REQUEST_TEMPLATE/elusoc.md @@ -1,14 +1,19 @@ ## ๐Ÿš€ Program + ELUSOC ## ๐Ÿ“ Description + ## ๐Ÿ”— Related Issue + Closes # ## ๐Ÿ”„ Type of Change + + - [ ] ๐Ÿ› Bug fix - [ ] โœจ New feature - [ ] ๐Ÿ” SEO improvement @@ -19,14 +24,18 @@ Closes # - [ ] ๐Ÿงน Refactor / cleanup ## ๐Ÿงช How to Test + + 1. Open `http://localhost:5173` in a browser 2. ... ## ๐Ÿ“ธ Screenshots (if applicable) + ## โœ… Checklist + - [ ] I am contributing under ELUSOC - [ ] My code follows the project's existing style - [ ] I have tested my changes in a browser diff --git a/.github/PULL_REQUEST_TEMPLATE/gssoc.md b/.github/PULL_REQUEST_TEMPLATE/gssoc.md index 61f11d11..8c719f5d 100644 --- a/.github/PULL_REQUEST_TEMPLATE/gssoc.md +++ b/.github/PULL_REQUEST_TEMPLATE/gssoc.md @@ -1,14 +1,19 @@ ## ๐Ÿš€ Program + GSSoC ## ๐Ÿ“ Description + ## ๐Ÿ”— Related Issue + Closes # ## ๐Ÿ”„ Type of Change + + - [ ] ๐Ÿ› Bug fix - [ ] โœจ New feature - [ ] ๐Ÿ” SEO improvement @@ -19,14 +24,18 @@ Closes # - [ ] ๐Ÿงน Refactor / cleanup ## ๐Ÿงช How to Test + + 1. Open `http://localhost:5173` in a browser 2. ... ## ๐Ÿ“ธ Screenshots (if applicable) + ## โœ… Checklist + - [ ] I am contributing under GSSoC - [ ] My code follows the project's existing style - [ ] I have tested my changes in a browser diff --git a/.github/PULL_REQUEST_TEMPLATE/nsoc.md b/.github/PULL_REQUEST_TEMPLATE/nsoc.md index 26e4bd3c..48aeadfb 100644 --- a/.github/PULL_REQUEST_TEMPLATE/nsoc.md +++ b/.github/PULL_REQUEST_TEMPLATE/nsoc.md @@ -1,14 +1,19 @@ ## ๐Ÿš€ Program + NSOC ## ๐Ÿ“ Description + ## ๐Ÿ”— Related Issue + Closes # ## ๐Ÿ”„ Type of Change + + - [ ] ๐Ÿ› Bug fix - [ ] โœจ New feature - [ ] ๐Ÿ” SEO improvement @@ -19,14 +24,18 @@ Closes # - [ ] ๐Ÿงน Refactor / cleanup ## ๐Ÿงช How to Test + + 1. Open `http://localhost:5173` in a browser 2. ... ## ๐Ÿ“ธ Screenshots (if applicable) + ## โœ… Checklist + - [ ] I am contributing under NSOC - [ ] My code follows the project's existing style - [ ] I have tested my changes in a browser diff --git a/.github/PULL_REQUEST_TEMPLATE/ssoc.md b/.github/PULL_REQUEST_TEMPLATE/ssoc.md index 4ddb218a..bb70c843 100644 --- a/.github/PULL_REQUEST_TEMPLATE/ssoc.md +++ b/.github/PULL_REQUEST_TEMPLATE/ssoc.md @@ -1,14 +1,19 @@ ## ๐Ÿš€ Program + SSOC ## ๐Ÿ“ Description + ## ๐Ÿ”— Related Issue + Closes # ## ๐Ÿ”„ Type of Change + + - [ ] ๐Ÿ› Bug fix - [ ] โœจ New feature - [ ] ๐Ÿ” SEO improvement @@ -19,14 +24,18 @@ Closes # - [ ] ๐Ÿงน Refactor / cleanup ## ๐Ÿงช How to Test + + 1. Open `http://localhost:5173` in a browser 2. ... ## ๐Ÿ“ธ Screenshots (if applicable) + ## โœ… Checklist + - [ ] I am contributing under SSOC - [ ] My code follows the project's existing style - [ ] I have tested my changes in a browser diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..f2d0698d --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,35 @@ +name: Lint and Format + +on: + pull_request: + branches: + - main + - master + push: + branches: + - main + - master + +jobs: + lint: + name: Run ESLint and Prettier + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "npm" + + - name: Install Dependencies + run: npm ci + + - name: Run Lint + run: npm run lint + + - name: Run Prettier Check + run: npm run format:check || npx prettier --check . diff --git a/.github/workflows/mentor-merge-eligibility.yml b/.github/workflows/mentor-merge-eligibility.yml index d0de4dd9..b469344a 100644 --- a/.github/workflows/mentor-merge-eligibility.yml +++ b/.github/workflows/mentor-merge-eligibility.yml @@ -23,7 +23,7 @@ on: permissions: contents: read pull-requests: read - statuses: write # needed to post commit statuses + statuses: write # needed to post commit statuses concurrency: group: mentor-eligibility-${{ github.event.pull_request.number }} @@ -152,4 +152,3 @@ jobs: name: pr_number path: pr/ retention-days: 1 - diff --git a/.github/workflows/pr-review-handler.yml b/.github/workflows/pr-review-handler.yml index 43bfa2d9..ba5cdcfe 100644 --- a/.github/workflows/pr-review-handler.yml +++ b/.github/workflows/pr-review-handler.yml @@ -122,12 +122,12 @@ jobs: core.info('Could not determine pull request associated with this workflow run. Skipping.'); return; } - + issue_number = pr.number; const prHeadSha = pr.head?.sha || headSha; - + core.info(`Processing review state for PR #${issue_number} (SHA: ${headSha})`); - + // โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ // CONFIGURATION: keep in sync with other workflows // โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ @@ -162,7 +162,7 @@ jobs: const ADMINS = ['itzzavdhesh']; const STATUS_CONTEXT = 'voiceforge/mentor-approved'; // โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ - + // 1. Fetch current labels on the PR fresh from the API let currentLabelsLower = []; try { @@ -287,7 +287,7 @@ jobs: // 4. Update mentor label logic const labelsToAdd = []; const labelsToRemove = []; - + for (const mentor of MENTORS) { const state = latestReviewByUser[mentor.toLowerCase()]; const label = mentorLabelMap[mentor]; @@ -299,11 +299,11 @@ jobs: labelsToRemove.push(label); } } - + // 5. Check if any mentor approved/changes requested let hasApproved = false; let hasChangesRequested = false; - + for (const user in latestReviewByUser) { const state = latestReviewByUser[user]; const isMentor = MENTORS.map(m => m.toLowerCase()).includes(user); @@ -327,7 +327,7 @@ jobs: } } } - + if (hasChangesRequested) { labelsToAdd.push('needs revision'); labelsToRemove.push('ready for review'); @@ -370,7 +370,7 @@ jobs: const state = latestReviewByUser[m.toLowerCase()]; return state === 'APPROVED' || state === 'COMMENTED' || state === 'CHANGES_REQUESTED'; }); - + if (reviewingMentors.length > 0) { const names = reviewingMentors.join(', '); await setStatus('success', `Reviewed by mentor(s): ${names} โ€” eligible to merge.`); diff --git a/.lintstagedrc b/.lintstagedrc new file mode 100644 index 00000000..0257341b --- /dev/null +++ b/.lintstagedrc @@ -0,0 +1,4 @@ +{ + "*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"], + "*.{json,md,yml,yaml,css,scss}": ["prettier --write"] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2fd1126d..aa09c10e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,5 @@ + # Contributing To VoiceForge Thanks for helping build an assistive open source tool with care. Please keep consent, privacy, and accessibility at the center of every contribution. @@ -56,11 +57,11 @@ MOCK_CHATTERBOX=true With this flag active the server behaves as follows: -| Endpoint | Live mode | Mock mode | -|---|---|---| -| `POST /api/voice/clone` | Stores reference audio, returns `voice_id` | Returns fixture `voice_id` instantly | -| `POST /api/voice/speak` | Enqueues real Chatterbox TTS stream | Enqueues mock stream | -| `GET /api/voice/speak/stream` | Proxies audio from Hugging Face | Streams a short silent MP3 locally | +| Endpoint | Live mode | Mock mode | +| ----------------------------- | ------------------------------------------ | ------------------------------------ | +| `POST /api/voice/clone` | Stores reference audio, returns `voice_id` | Returns fixture `voice_id` instantly | +| `POST /api/voice/speak` | Enqueues real Chatterbox TTS stream | Enqueues mock stream | +| `GET /api/voice/speak/stream` | Proxies audio from Hugging Face | Streams a short silent MP3 locally | You can exercise the **complete UI flow** โ€” record โ†’ clone โ†’ type text โ†’ Speak โ†’ download โ€” entirely offline. @@ -76,12 +77,12 @@ PR description: ```markdown ## Testing Notes + Tested clone and TTS end-to-end using MOCK_CHATTERBOX=true. Live Chatterbox path verified locally with MOCK_CHATTERBOX=false. UI logic confirmed with mock blob in CI. ``` - ## Program Contributions VoiceForge accepts contributions through GSSoC, NSOC, SSOC, and ELUSOC. Program contributors must use the matching issue and pull request templates. @@ -121,7 +122,6 @@ Polite assignment requests such as "please assign this issue to me" or "I would ## Good First Issues - ## Pull Request Checklist - The app runs with `npm install && npm run dev`. diff --git a/README.md b/README.md index 7c42abea..e7b5f6ad 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ + # VoiceForge VoiceForge is a browser-based assistive video tool that lets a user type during calls and output cloned speech with a lip-synced face preview. @@ -72,7 +73,7 @@ npm install cp .env.example .env ``` -4. *(Optional)* Open `.env` and review the settings. The defaults run in offline mock mode, so no API key or internet access is needed. See [Environment Variables](#environment-variables) for the full reference. +4. _(Optional)_ Open `.env` and review the settings. The defaults run in offline mock mode, so no API key or internet access is needed. See [Environment Variables](#environment-variables) for the full reference. 5. Start the client and server together: ```bash @@ -87,13 +88,13 @@ npm run dev All variables live in your local `.env` file (copy from `.env.example`). **None of them require a paid account or API key.** -| Variable | Default | Description | -| --- | --- | --- | -| `VOICE_ENGINE_SPACE` | *(commented out)* | The Hugging Face Gradio space used for voice synthesis. See the dual-mode setup below. | -| `MOCK_CHATTERBOX` | `true` | Controls whether the live AI or an offline test stub is used. See below. | -| `PORT` | `3001` | Express API port. | -| `CLIENT_URL` | `http://localhost:5173` | Allowed CORS origin for the Vite dev server. | -| `STREAM_SECRET` | *(auto-generated)* | AES-256-GCM signing key for speech stream tokens. Set a fixed value to survive server restarts. | +| Variable | Default | Description | +| -------------------- | ----------------------- | ----------------------------------------------------------------------------------------------- | +| `VOICE_ENGINE_SPACE` | _(commented out)_ | The Hugging Face Gradio space used for voice synthesis. See the dual-mode setup below. | +| `MOCK_CHATTERBOX` | `true` | Controls whether the live AI or an offline test stub is used. See below. | +| `PORT` | `3001` | Express API port. | +| `CLIENT_URL` | `http://localhost:5173` | Allowed CORS origin for the Vite dev server. | +| `STREAM_SECRET` | _(auto-generated)_ | AES-256-GCM signing key for speech stream tokens. Set a fixed value to survive server restarts. | ### Dual-Mode Voice Engine Setup @@ -182,15 +183,13 @@ Go to Settings > Devices > Camera and select **OBS Virtual Camera**. ## API -| Method | Endpoint | Description | -| --- | --- | --- | -| `POST` | `/api/voice/clone` | Upload reference audio. Stores it server-side and returns a `voice_id`. No external API call in mock mode. | -| `POST` | `/api/voice/speak` | Send text, `voice_id`, and optional voice settings. Returns a signed `speechId` and streaming `audioUrl`. | -| `GET` | `/api/voice/speak/stream?t=` | Stream the Chatterbox-generated audio for a pending signed speech token (`t`). Proxied from the Hugging Face Space. | -| `GET` | `/api/voice/status` | Returns current engine mode (`isMock`, `space`) for debugging. | -| `GET` | `/api/health` | Returns local API health status. | - - +| Method | Endpoint | Description | +| ------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `POST` | `/api/voice/clone` | Upload reference audio. Stores it server-side and returns a `voice_id`. No external API call in mock mode. | +| `POST` | `/api/voice/speak` | Send text, `voice_id`, and optional voice settings. Returns a signed `speechId` and streaming `audioUrl`. | +| `GET` | `/api/voice/speak/stream?t=` | Stream the Chatterbox-generated audio for a pending signed speech token (`t`). Proxied from the Hugging Face Space. | +| `GET` | `/api/voice/status` | Returns current engine mode (`isMock`, `space`) for debugging. | +| `GET` | `/api/health` | Returns local API health status. | ## Roadmap diff --git a/client/index.html b/client/index.html index a4516d60..bb12eb22 100644 --- a/client/index.html +++ b/client/index.html @@ -5,7 +5,10 @@ - + VoiceForge diff --git a/client/postcss.config.js b/client/postcss.config.js index 6900a54a..d55cab13 100644 --- a/client/postcss.config.js +++ b/client/postcss.config.js @@ -2,6 +2,6 @@ export default { plugins: { tailwindcss: {}, - autoprefixer: {} - } + autoprefixer: {}, + }, }; diff --git a/client/public/404.html b/client/public/404.html index 81f67fe1..04437317 100644 --- a/client/public/404.html +++ b/client/public/404.html @@ -6,23 +6,29 @@ 404 โ€” VoiceForge