uezo / aiavatarkit

🥰 Building AI-based conversational avatars lightning fast ⚡️💬
Apache License 2.0
162 stars 10 forks source link

Support getting audio device by name #3

Closed uezo closed 1 year ago

uezo commented 1 year ago

Add the methods below to AudioDevice.

Partial match, ignore case.

Now you can instantiate AIAvatar with the name of audio devices.

app = AIAvatar(
    google_api_key=GOOGLE_API_KEY,
    openai_api_key=OPENAI_API_KEY,
    voicevox_url=VV_URL,
    voicevox_speaker_id=VV_SPEAKER,
    system_message_content=system_message_content,
    input_device="pro",               # matches `MacBook Pro Speaker`
    output_device="cable-b input",    # matches `CABLE-B Input (VB-Audio`
)