Skip to content

Commit

Permalink
fix naming between Alice and HLC
Browse files Browse the repository at this point in the history
  • Loading branch information
Psychokiller1888 committed Jul 17, 2022
1 parent e3ae2c8 commit 101c7d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions AliceCli/install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@


@click.command(name='installSoundDevice')
@click.option('-d', '--device', type=click.Choice(['respeaker2', 'respeaker4', 'respeaker4MicLinearArray', 'respeaker6MicArray'], case_sensitive=False))
@click.option('-d', '--device', type=click.Choice(['respeaker2Mics', 'respeaker4Mics', 'respeaker4MicLinearArray', 'respeaker6MicArray'], case_sensitive=False))
@click.pass_context
@checkConnection
def installSoundDevice(ctx: click.Context, device: str):
Expand All @@ -56,7 +56,7 @@ def installSoundDevice(ctx: click.Context, device: str):
ctx.invoke(uninstallSoundDevice, device=device, return_to_main_menu=False)
commons.waitAnimation()
sshCmd('sudo apt-get install git -y')
if device.lower() in {'respeaker2', 'respeaker4', 'respeaker4miclineararray', 'respeaker6micarray'}:
if device.lower() in {'respeaker2Mics', 'respeaker4Mics', 'respeaker4miclineararray', 'respeaker6micarray'}:
sshCmd('git clone https://github.com/HinTak/seeed-voicecard.git ~/seeed-voicecard/')
sshCmd('git -C ~/seeed-voicecard/ checkout v5.9 && git -C ~/seeed-voicecard/ pull')
sshCmd('cd ~/seeed-voicecard/ && sudo ./install.sh')
Expand All @@ -67,7 +67,7 @@ def installSoundDevice(ctx: click.Context, device: str):


@click.command(name='uninstallSoundDevice')
@click.option('-d', '--device', type=click.Choice(['respeaker2', 'respeaker4', 'respeaker4MicLinearArray', 'respeaker6MicArray'], case_sensitive=False))
@click.option('-d', '--device', type=click.Choice(['respeaker2Mics', 'respeaker4Mics', 'respeaker4MicLinearArray', 'respeaker6MicArray'], case_sensitive=False))
@click.pass_context
@checkConnection
def uninstallSoundDevice(ctx: click.Context, device: str, return_to_main_menu: bool = True): # NOSONAR
Expand All @@ -78,7 +78,7 @@ def uninstallSoundDevice(ctx: click.Context, device: str, return_to_main_menu: b
if not device:
return

if device.lower() in {'respeaker2', 'respeaker4', 'respeaker4miclineararray', 'respeaker6micarray'}:
if device.lower() in {'respeaker2Mics', 'respeaker4Mics', 'respeaker4miclineararray', 'respeaker6micarray'}:
result = sshCmdWithReturn('test -d ~/seeed-voicecard/ && echo "1"')[0].readline()
if result:
sshCmd('cd ~/seeed-voicecard/ && sudo ./uninstall.sh')
Expand All @@ -94,10 +94,10 @@ def getDeviceName() -> str:
return inquirer.select(
message='Select your device',
choices=[
Choice('respeaker2', name='Respeaker 2'),
Choice('respeaker4', name='Respeaker 4-mic array'),
Choice('respeaker4MicLinearArray', name='Respeaker 4 mic linear array'),
Choice('respeaker6MicArray', name='Respeaker 6 mic array')
Choice('respeaker2Mics', name='Respeaker 2 mics'),
Choice('respeaker4Mics', name='Respeaker 4 mics array'),
Choice('respeaker4MicLinearArray', name='Respeaker 4 mics linear array'),
Choice('respeaker6MicArray', name='Respeaker 6 mics array')
]
).execute()

Expand Down Expand Up @@ -792,13 +792,13 @@ def getAliceSatConfig(confs, releaseType):
def inquireAudioDevice():
return inquirer.select(
message='Select your audio hardware if listed',
default='respeaker2',
default='respeaker2Mics',
choices=[
Choice('respeaker2', name='Respeaker 2 mics'),
Choice('respeaker4', name='Respeaker 4 mic array'),
Choice('respeaker4MicLinear', name='Respeaker 4 mic linear array'),
Choice('respeaker6', name='Respeaker 6 mic array'),
Choice('respeaker7', name='Respeaker 7'),
Choice('respeaker2Mics', name='Respeaker 2 mics'),
Choice('respeaker4Mics', name='Respeaker 4 mics array'),
Choice('respeaker4MicLinear', name='Respeaker 4 mics linear array'),
Choice('respeaker6', name='Respeaker 6 mics array'),
Choice('respeaker7MicArray', name='Respeaker 7 mics array'),
Choice('respeakerCoreV2', name='Respeaker Core version 2'),
Choice('googleAIY', name='Google AIY'),
Choice('googleAIY2', name='Google AIY 2'),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name='projectalice-cli',
version='1.3.24',
version='1.3.25',
long_description=Path('README.md').read_text(encoding='utf8'),
long_description_content_type='text/markdown',
python_requires='>=3.8',
Expand Down

0 comments on commit 101c7d9

Please sign in to comment.