# 安裝環境相關 ## pytorch安裝(對應cuda) 檢查CUDA ``` nvidia-smi ``` 官網對應版本 https://pytorch.org/get-started/previous-versions/ 語法 : torch==1.12.0+cu113 版本 ``` pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu113 ``` Successfully installed torch-1.12.0+cu113 torchaud 檢查語法 torch.cuda.is_available()=True ``` python import torch torch.cuda.is_available() ``` ## 相關pyton 套件 ``` pip install audioread==3.0.1 pip install onnx==1.15.0 pip install onnxruntime==1.15.0 pip install wget==3.2 pip install timm==0.4.5 Please use timm == 0.4.5, the code might not be compatible with newer versions. pip install numpy==1.26.3 pip install pandas==2.1.4 pip install scikit-learn==1.3.2 pip install scipy==1.11.4 ``` ## Windows sox 安装和使用方法 ### 安裝步驟 #### 官網下載 http://sox.sourceforge.net/ 下載 sox sox-14.4.2-win32.exe #### 添加環境變數 要先把sox的安裝路徑添加到環境變數 ``` "我的電腦" 右鍵 --> "內容"--> 拉到下方 相關設定的"進階系統設定" --> "進階" 分頁中 --> 下方 按鈕 "環境變數(N)" --> 在"Path"項目 滑鼠兩下打開 --> 新增 --> C:\Program Files (x86)\sox-14-4-2 ``` ![image](https://hackmd.io/_uploads/r1ccVAsu6.png) 執行sox-14.4.2-win32.exe ![image](https://hackmd.io/_uploads/HylrSCiua.png) ### 測試安裝是否成功 ``` cmd sox ``` ![image](https://hackmd.io/_uploads/rygqSCiO6.png) 其他相關警示 sox WARN rate: rate clipped 35 samples; decrease volume? sox WARN dither: dither clipped 29 samples; decrease volume? 44k to 16k sox cry_44k *.wav -r 16000 cry_16k.wav 命令串接所有音檔 sox *.wav long.wav ### 參考來源 https://blog.csdn.net/weixin_42997646/article/details/87969705 https://blog.csdn.net/weixin_43216017/article/details/88531363 ## Windows FFMPEG 安装和使用方法 命令串接所有音檔 ffmpeg -i "1-22694-A-20.wav|1-22694-B-20.wav" -c copy out.wav ### 參考來源 https://vocus.cc/article/64701a2cfd897800014daed0 ## Python ### Spyder不能debug TypeError: runfile() got an unexpected keyword argument 'current_namespace' ``` conda install ipykernel=6.2.0 ``` ### debug會卡在第一行 ``` conda install qtconsole=5.1.1 ```