SOX——Sound eXchange
the Swiss Army knife of sound processing programs.
1.準備:
- 計算機(Ubuntu 20.04 LTS)
- 音頻檔案
2.軟體介紹:
SoX is a cross-platform (Windows, Linux, MacOS X, etc.) command line utility that can convert various formats of computer audio files in to other formats. It can also apply various effects to these sound files, and, as an added bonus, SoX can play and record audio files on most platforms.
此程式雖然功能很多,但可以當作簡單的命令列音樂播放器,進行音頻檔案播放,尤其是沒有圖形界面的服務器版本(建議以檔案夾組織音頻檔案作為播放串列),
3.程式安裝:
安裝sox程式:
apt install sox
安裝sox格式擴展包( All SoX format libraries):
apt install libsox-fmt-all
4.音頻播放:
當檔案全為mp3格式時:
play *.mp3
當然,當音頻檔案格式不同時:
play *.*
注:當想要播放下一首時使用ctrl+c組合鍵來切換,(終止當前音頻檔案播放,執行下一個音頻檔案播放)
5.擴展:
- 當程式運行時間較長,又不想盯著螢屏等待,并且此時又無事可做時,可以使用sox播放提示音,等待期間,玩會兒手機也不錯,
以運行nmap為例:
nmap xxx.xxx.xxx.xxx;play alarm.mp3
- 和sleep組合設定定時器,設定10s后播放提示音:
sleep 10;play alarm.mp3
報警音推薦(電子手表報警聲):http://downsc.chinaz.net/Files/DownLoad/sound1/201608/7711.mp3
2020-08-08 00:21:25
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/6467.html
標籤:Linux
