VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.
Python aiaudiobookcudadubbingelevenlabs-alternativehuggingfacelocal-firstmlxomnivoice-studiospeech-to-texttext-to-speechtranscriptiontranslatettsvoice-aivoice-cloningvoice-generationvoicestudioworkflow
import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import { describe, it, expect, vi } from 'vitest';
import DubToggle from './DubToggle';
describe('DubToggle', () => {
it('announces its state and updates through the supplied handler', () => {
const onChange = vi.fn();
const { rerender } = render(<DubToggle label="Preview" checked={false} onChange={onChange} />);
fireEvent.click(screen.getByRole('switch', { name: 'Preview', checked: false }));
expect(onChange).toHaveBeenCalledWith(true);
rerender(<DubToggle label="Preview" checked onChange={onChange} />);
expect(screen.getByRole('switch', { name: 'Preview' })).toHaveAttribute('aria-checked', 'true');
});
});