上传自定义声音#

打开控制面板#

选择齿轮图标打开控制面板。

A screenshot of the upper left corner of the VEXcode AIR Toolbar, with the gear icon highlighted below the download icon.

选择“声音”选项卡#

A close up screenshot of the top of the Control panel in VEXcode AIR, with the Sounds tab on the right highlighted.

选择“上传”图标#

A close up screenshot of the Sound tab in Control panel in VEXcode AIR open, with the upload icon, a file folder with an up arrow on it, in row 1 highlighted.

使用声音选择器#

声音选择器将会出现。在选择发送至无人机之前,请选择任何预加载的声音。

A screenshot of the Sound Selector in VEXcode AIR reads Select a Sound at the top, with a 3 by 4 table of sound options available. Number 3 in the top row is highlighted, along with the Send to Drone button in the lower right corner.

要上传自定义声音,请选择上传自定义声音,然后选择选择文件打开设备的文件导航。

**注意:**声音文件必须是小于 1 MB 的 MP3。

The same image as the one previous, now with the Upload Custom Sound option in the lower right corner of the grid highlighted, along with the Select File directly below it.

声音现已可用#

声音将被上传并显示在所选的插槽中。默认情况下,声音将被命名为 SOUND1,其编号与声音上传到的插槽相匹配。

声音上传完成后,已上传声音插槽中的按钮将启用。这些按钮允许您覆盖、预览、删除或重命名已上传的声音文件。

A close up screenshot of the Sounds Tab of the Control Panel in VEXcode AIR reads Sound 1 in the first row, and all buttons are available. From left to right they are Upload, Play sound, and trash.

您可以在项目中使用自定义声音,方法是使用 BlocksPythonSound 类别中的以下命令:

显示图像文件自定义图像#
[Select your sound from the dropdown.]
播放声音文件 [SOUND1 v] ▶
# Change SOUND1 to the name of your sound
controller.sound.play_file(SOUND1)

重命名声音文件#

选择铅笔图标来重命名声音。这将是您在项目中使用该声音文件时的声音名称。

**注意:**名称不能以数字开头,且长度不得超过 14 个字符。

The same screenshot as previously, with the row 1 sound file reading Takeoff, and the pencil edit icon to the right of the text highlighted.

预览声音文件#

选择计算机图标即可听到设备上的声音。

The same screenshot of row 1 as previously, with the center button below the name highlighted. The button has a computer and a play arrow icon.

删除声音文件#

选择垃圾桶图标从插槽中删除声音文件。

The same screenshot of row 1 as previously, with the right button below the name highlighted. The button has a trash can icon.

要一次删除所有声音,请选择“声音”选项卡底部的“删除所有声音”按钮。

A close up screenshot of the bottom of the Sounds tab in the Control Panel showing row 10 with the Delete All Sounds button in the bottom center highlighted.