in ultravox/tools/ds_tool/tts.py [0:0]
def resolve_voice(self, voice: Optional[str]) -> str:
voice = voice or self.DEFAULT_VOICE
if voice == RANDOM_VOICE_KEY:
# Every process has same random seed, so we mix in the PID here for more variation.
i = np.random.randint(len(self.ALL_VOICES)) + os.getpid()
voice = self.ALL_VOICES[i % len(self.ALL_VOICES)]
return voice