Align default Replicate model to the versioned Kokoro model across UI, docs, and server logic. Refactor TTS settings merging for audiobooks to ensure consistent normalization. Improve Retry-After header handling for upstream rate limits. Expand Replicate voice resolution to use model schemas when available, with test coverage for custom and built-in models. Update documentation to reflect new Replicate defaults, model selection, and configuration guidance.
21 lines
872 B
TypeScript
21 lines
872 B
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
import { getMaxVoicesForProvider } from '../../src/lib/shared/kokoro';
|
|
|
|
test.describe('kokoro voice limits', () => {
|
|
test('keeps Replicate single-voice even for Kokoro models', () => {
|
|
expect(getMaxVoicesForProvider('replicate', 'kokoro')).toBe(1);
|
|
expect(getMaxVoicesForProvider('replicate', 'hexgrad/Kokoro-82M')).toBe(1);
|
|
});
|
|
|
|
test('keeps Deepinfra single-voice and allows multi-voice elsewhere', () => {
|
|
expect(getMaxVoicesForProvider('deepinfra', 'hexgrad/Kokoro-82M')).toBe(1);
|
|
expect(getMaxVoicesForProvider('custom-openai', 'kokoro')).toBe(Infinity);
|
|
});
|
|
|
|
test('non-kokoro models are always single-voice', () => {
|
|
expect(getMaxVoicesForProvider('replicate', 'google/gemini-3.1-flash-tts')).toBe(1);
|
|
expect(getMaxVoicesForProvider('openai', 'gpt-4o-mini-tts')).toBe(1);
|
|
});
|
|
});
|
|
|