ShipBit/wingman-ai

Global elevenlabs voice config overrides Wingman elevenlabs config | Breaks app

Closed this issue · 3 comments

If a global voice name is supplied for the elevenlabs config object, voice: Adam, and a later elevenlabs config object has a voice object specified voice: id: <id>, it breaks the app trying to merge an item with a string.

Tower.py - line 32. Not exact area but starting point

def __instantiate_wingmen(self) -> list[Wingman]:
...
            merged_config = self.__merge_configs(global_config, wingman_config) <- HERE
            class_config = merged_config.get("class")

            wingman = None

Also related to

voice = elevenlabs_config.get("voice")
if not isinstance(voice, str):
voice = Voice(voice_id=voice.get("id"))
else:
voice = next((v for v in voices() if v.name == voice), None)
which is not correct as it always disabled the id if a name is set as well.

I fixed it. Do you want to take a look at the PR, @JaydiCodes? Thank you!

@Shackless I took a look. It's what we both were thinking. Sure that would work fine.