Skip to content

T-Sumida/SamplingRateConversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SamplingRateConversion

サンプリング周波数変換処理を行うプログラム

Overview

サンプリング周波数変換(アップサンプリングとダウンサンプリング)処理をStreamlitで実装したものです.

QiiteにあるようなPythonスクリプトはscriptフォルダに格納しており、サンプリング周波数変換とwavファイルのスペクトログラムを描画を実行することができます。

サンプルとして,基本周波数1000Hzの矩形波(test.wav)とその結果(test_up.wav, test_down.wav)が入っています.

コード内に問題がある可能性があるので,もしお気づきになられたら修正 or 連絡をお願い致します.

gif

Usage

  • 環境構築

    $pip install -r requirements.txt
  • streamlitアプリの実行

    $streamlit run app.py
  • スクリプトの実行

    • 周波数変換スクリプト
      $python script/sr_converter.py {input file path} {output dir path} --up {up sampling conversion} --down {down conversion rate}
      
      #
      $python script/sr_converter.py ./wav/test.wav ./wav --up 4 --down 4
    • 可視化スクリプト
      $python script/visualizer.py {input wav file path} -o {output file path} -N {FFT window}
      
      #
      $python script/visuazlier.py ./wav/test_up.wav -o ./result_png/up.png -N 512

License

Copyright © 2022 T_Sumida Distributed under the MIT License.

About

サンプリング周波数変換処理を行うプログラム

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages