<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def speaker(dev: Device, target, value):
 """Get and set external speaker settings."""

    if target and value:
        click.echo("Setting %s to %s" % (target, value))
        await dev.set_speaker_settings(target, value)

    print_settings(await dev.get_speaker_settings())