Skip to content

Commit 6cf5b33

Browse files
committed
wave is a Python Standard Library module
Installing the third-party ___Whole Architecture Verification___ module https://pypi.org/project/Wave is [breaking our builds](https://github.com/ArduPilot/MAVProxy/actions/workflows/windows_build.yml). The Python Standard Library module [`wave`](https://docs.python.org/3/library/wave.html) has an API that corresponds to: https://github.com/ArduPilot/MAVProxy/blob/a45549f9bcb09603be1507c260de2bafe516212a/MAVProxy/modules/mavproxy_chat/chat_voice_to_text.py#L72-L78 Therefore, we should stop doing `pip install wave` and instead use the Standard Library. The docs at https://ardupilot.org/mavproxy/docs/modules/chat.html#prerequisites must also be modified. % `git grep wave`
1 parent a45549f commit 6cf5b33

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.github/workflows/windows_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: |
2626
python3 -m pip install -U wheel setuptools pip
2727
python3 -m pip install -U pywin32 lxml pymavlink numpy matplotlib pyserial opencv-python PyYAML Pygame Pillow wxpython prompt-toolkit scipy
28-
python3 -m pip install -U openai wave pyaudio
28+
python3 -m pip install -U openai pyaudio
2929
python3 -m pip install -U pyinstaller==6.7.0 packaging
3030
- name: Download Inno Setup installer
3131
run: curl -L -o installer.exe http://files.jrsoftware.org/is/6/innosetup-6.3.1.exe

MAVProxy/modules/mavproxy_chat/chat_voice_to_text.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
AP_FLAKE8_CLEAN
66
'''
77

8-
8+
import wave
99
try:
1010
import pyaudio # install using, "sudo apt-get install python3-pyaudio"
11-
import wave # install with "pip3 install wave"
1211
from openai import OpenAI
1312
except Exception:
14-
print("chat: failed to import pyaudio, wave or openai. See https://ardupilot.org/mavproxy/docs/modules/chat.html")
13+
print("chat: failed to import pyaudio or openai. See https://ardupilot.org/mavproxy/docs/modules/chat.html")
1514
exit()
1615

1716
# initializing the global list to keep and update the stop_recording state

windows/MAVProxyWinBuild.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if exist "..\..\pymavlink" (
3333
rem -----Install additional Python packages-----
3434
python.exe -m pip install -U wheel setuptools pip
3535
python.exe -m pip install pywin32 lxml pymavlink numpy matplotlib pyserial opencv-python PyYAML Pygame Pillow wxpython prompt-toolkit scipy
36-
python.exe -m pip install -U openai wave pyaudio
36+
python.exe -m pip install -U openai pyaudio
3737
python.exe -m pip install -U pyinstaller==6.7.0 packaging
3838
python.exe -m pip install -U requests
3939

0 commit comments

Comments
 (0)