dpo_reader.tts.bark

Bark TTS backend - highest quality, GPU recommended for speed.

Classes

BarkBackend

Bark TTS backend.

class dpo_reader.tts.bark.BarkBackend[source]

Bases: TTSBackend

Bark TTS backend.

name: str = 'bark'
sample_rate: int = 24000
narrator_voice: str = 'v2/en_speaker_0'
__init__()[source]
get_voices()[source]

Return list of available voice IDs.

Return type:

list[str]

synthesize(text, voice)[source]

Synthesize text to audio.

Parameters:
  • text (str) – Text to synthesize

  • voice (str) – Voice ID to use

Returns:

Audio as float32 numpy array

Return type:

ndarray