try to make it work for rpi speakers
This commit is contained in:
+4
-3
@@ -107,10 +107,11 @@ class Audio:
|
|||||||
|
|
||||||
# open stream based on the wave object which has been input.
|
# open stream based on the wave object which has been input.
|
||||||
stream = p.open(
|
stream = p.open(
|
||||||
format=p.get_format_from_width(wf.getsampwidth()),
|
format=p.get_format_from_width(RESPEAKER_WIDTH),
|
||||||
channels=wf.getnchannels(),
|
channels=RESPEAKER_CHANNELS,
|
||||||
rate=wf.getframerate(),
|
rate=RESPEAKER_RATE,
|
||||||
output=True,
|
output=True,
|
||||||
|
output_device_index=RESPEAKER_INDEX,
|
||||||
)
|
)
|
||||||
|
|
||||||
# read data (based on the chunk size)
|
# read data (based on the chunk size)
|
||||||
|
|||||||
Reference in New Issue
Block a user