0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Python: pydub の使い方 (再生)

Posted at

pydub で再生をする方法です。

play.py
#! /usr/bin/python
#
#	play.py
#
#						Oct/06/2020
#
# ------------------------------------------------------------------
import sys
from pydub import AudioSegment
from pydub.playback import play

# ------------------------------------------------------------------
sys.stderr.write("*** 開始 ***\n")
#
file_in = sys.argv[1]

audio_aa = AudioSegment.from_wav(file_in)
play(audio_aa)
#
sys.stderr.write("*** 終了 ***\n")
# ------------------------------------------------------------------

実行方法

./play.py input.wav
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?