Skip to content

Commit ed86158

Browse files
minor chart changes
1 parent 739f3bd commit ed86158

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

charts/doggo/templates/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ spec:
5454
{{ if .Values.doggo.outputSampleRate }}
5555
- "--output-sample-rate={{ .Values.doggo.outputSampleRate }}"
5656
{{ end }}
57+
{{ if .Values.doggo.inputDevice }}
58+
- "--input-device={{ .Values.doggo.inputDevice }}"
59+
{{ end }}
60+
{{ if .Values.doggo.outputDevice }}
61+
- "--output-device={{ .Values.doggo.outputDevice }}"
62+
{{ end }}
5763
{{- with .Values.resources }}
5864
resources:
5965
{{- toYaml . | nindent 12 }}

charts/doggo/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ doggo:
1212
# explicitly set the output sample rate for the speaker device
1313
outputSampleRate: ~
1414

15+
# explicitly set the input device for the microphone device
16+
inputDevice: ~
17+
# explicitly set the output device for the speaker device
18+
outputDevice: ~
19+
1520
# This is a YAML-formatted file.
1621
# Declare variables to be passed into your templates.
1722

doggo.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,11 @@ async def loop(dog):
292292
@click.option("--configure-input/--no-configure-input", is_flag=True, default=False)
293293
@click.option("--sample-rate", type=int, default=44100)
294294
@click.option("--output-sample-rate", type=int, default=0)
295-
def main(voice, alive, configure_input, sample_rate, output_sample_rate):
295+
@click.option("--input-device", type=str, default="USB PnP")
296+
@click.option("--output-device", type=str, default="UACDemo")
297+
def main(voice, alive, configure_input, sample_rate, output_sample_rate, input_device, output_device):
296298
if configure_input:
297-
sd.default.device = ("USB PnP", "UACDemo")
299+
sd.default.device = (input_device, output_device)
298300
if sample_rate > 0:
299301
sd.default.samplerate = sample_rate
300302
devices = sd.query_devices()

0 commit comments

Comments
 (0)