Skip to content

Conversation

@erew123
Copy link
Contributor

@erew123 erew123 commented Nov 10, 2024

Select the version in the interface.
I am providing an update to the AllTalk extension so that it works with both AllTalk V1 servers and AllTalk v2 servers.

Checklist:

Select the version in the interface. 
RVC is not supported on AllTalk V1
@Cohee1207 Cohee1207 changed the base branch from release to staging November 11, 2024 16:26
@Cohee1207 Cohee1207 changed the base branch from staging to release November 11, 2024 16:35
@Cohee1207 Cohee1207 changed the base branch from release to staging November 11, 2024 16:35
Copy link
Member

@Cohee1207 Cohee1207 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please provide a cleaner diff. This is hard to review without external tools, this is required to make sure that we're not losing any bugfixes made in the code base after the initial commit.
  2. Please run eslint (npm run lint) on the changes and fix the highlighted issues. The consistent code style is important for maintainability.

1. Core Feature Addition:
   - Added AllTalk V1/V2 server version selection
   - Added RVC (Realistic Voice Conversion) support for V2
   - RVC features are automatically disabled when V1 is selected

2. Code Improvements:
   - Replaced custom debounce implementation with shared utils.js debounce utility
   - Fixed linting issues:
     - Converted HTML attribute quotes in template literals to single quotes
     - Added trailing commas where required
     - Fixed console.error message formatting

3. New Settings/Properties Added:
   ```javascript
   server_version: 'v2' (default)
   rvc_character_voice: 'Disabled'
   rvc_character_pitch: '0'
   rvc_narrator_voice: 'Disabled'
   rvc_narrator_pitch: '0'
   ```

4. Bug Fixes/Improvements:
   - Better error handling for RVC voice fetching
   - Improved URL handling for V1/V2 differences in API responses
   - Enhanced settings initialization and validation

5. Structural Changes:
   - Added RVC-specific UI elements and controls
   - Added version-specific logic for API endpoints
   - Improved settings synchronization between UI and backend

**NOTE** On line 70 there is an eslint bypass:

```javascript
        // HTML template literals can trigger ESLint quotes warnings when quotes are used in HTML attributes.
        // Disabling quotes rule for this one line as it's a false positive with HTML template literals.
        // eslint-disable-next-line quotes
        let html = `<div class="at-settings-separator">AllTalk V2 Settings</div>`;
```

The reason is:
1. ESLint's quotes rule wants all strings to use single quotes
2. However, this is a template literal containing HTML, where double quotes are standard for attributes
3. I tried various solutions:
   - Using single quotes: `<div class='at-settings-separator'>`
   - Using double quotes: `<div class="at-settings-separator">`
   - Even tried escaping quotes
   But ESLint just kept flagging it as an error
@erew123
Copy link
Contributor Author

erew123 commented Nov 15, 2024

Hi @Cohee1207

Hopefully, this should cover everything, but let me know if not!

Thanks

erew123

Updates in the extension

  1. Core Feature Addition:

    • Added AllTalk V1/V2 server version selection
    • Added RVC (Realistic Voice Conversion) support for V2
    • RVC features are automatically disabled when V1 is selected
  2. Code Improvements:

    • Replaced custom debounce implementation with shared utils.js debounce utility
    • Fixed linting issues:
      • Converted HTML attribute quotes in template literals to single quotes
      • Added trailing commas where required
      • Fixed console.error message formatting
  3. New Settings/Properties Added:

    server_version: 'v2' (default)
    rvc_character_voice: 'Disabled'
    rvc_character_pitch: '0'
    rvc_narrator_voice: 'Disabled'
    rvc_narrator_pitch: '0'
  4. Bug Fixes/Improvements:

    • Better error handling for RVC voice fetching
    • Improved URL handling for V1/V2 differences in API responses
    • Enhanced settings initialization and validation
  5. Structural Changes:

    • Added RVC-specific UI elements and controls
    • Added version-specific logic for API endpoints
    • Improved settings synchronization between UI and backend

NOTE On line 70 there is an eslint bypass:

        // HTML template literals can trigger ESLint quotes warnings when quotes are used in HTML attributes.
        // Disabling quotes rule for this one line as it's a false positive with HTML template literals.
        // eslint-disable-next-line quotes
        let html = `<div class="at-settings-separator">AllTalk V2 Settings</div>`;

The reason is:

  1. ESLint's quotes rule wants all strings to use single quotes
  2. However, this is a template literal containing HTML, where double quotes are standard for attributes
  3. I tried various solutions:
    • Using single quotes: <div class='at-settings-separator'>
    • Using double quotes: <div class="at-settings-separator">
    • Even tried escaping quotes
      But ESLint just kept flagging it as an error

Copy link
Member

@Cohee1207 Cohee1207 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, thanks. Will test and merge tonight.

@Cohee1207
Copy link
Member

Working.

@Cohee1207 Cohee1207 merged commit 85d25a8 into SillyTavern:staging Nov 16, 2024
@erew123
Copy link
Contributor Author

erew123 commented Nov 16, 2024

@Cohee1207 Awesome! Thanks so much :)

erew123 added a commit to erew123/alltalk_tts that referenced this pull request Nov 17, 2024
@Wolfsblvt Wolfsblvt added 🟥 ⬤⬤⬤⬤⬤ [PR][🎯Auto-applied] [XL] >1000 lines changed ✨ New Feature [PR] Contains implementation of a new feature ➕ Extension [ISSUE][PR] This is related to one of the core extensions 🎙️ TTS / Voice [ISSUE][PR] Related to TTS or Voice features labels Mar 22, 2025
@SillyTavern SillyTavern deleted a comment from github-actions bot Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

➕ Extension [ISSUE][PR] This is related to one of the core extensions ✨ New Feature [PR] Contains implementation of a new feature 🎙️ TTS / Voice [ISSUE][PR] Related to TTS or Voice features 🟥 ⬤⬤⬤⬤⬤ [PR][🎯Auto-applied] [XL] >1000 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants