"리눅스 mp3 재생속도 변환"의 두 판 사이의 차이

 
(사용자 2명의 중간 판 5개는 보이지 않습니다)
5번째 줄: 5번째 줄:
;sox
;sox


==sox 설치==
==사전 작업==
{{참고|sox 설치}}
*[[sox 설치]]
 
*[[mpg123 설치]]
==mpg123 설치==
*[[lame 설치]]
{{참고|mpg123 설치}}
 
==lame 설치==
{{참고|lame 설치}}


==실습==
==실습==
<source lang='dos'>
<source lang='console'>
[root@jmnote ~]# wget -q -U Mozilla -O hello.mp3 "http://translate.google.com/translate_tts?tl=en&q=hello"
[root@zetawiki ~]# wget -q -U Mozilla -O hello.mp3 "http://translate.google.com/translate_tts?tl=en&q=hello"
[root@jmnote ~]# mpg123 -w hello.wav hello.mp3  
[root@zetawiki ~]# mpg123 -w hello.wav hello.mp3  
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.14.4; written and copyright by Michael Hipp and others
version 1.14.4; written and copyright by Michael Hipp and others
29번째 줄: 25번째 줄:
</source>
</source>
:→ TTS로 mp3 생성 후, wav로 변환
:→ TTS로 mp3 생성 후, wav로 변환
<source lang='dos'>
<source lang='console'>
[root@jmnote ~]# sox hello.wav -w hello2.wav speed 2
[root@zetawiki ~]# sox hello.wav -w hello2.wav speed 2
[root@jmnote ~]# lame hello2.wav hello2.mp3
[root@zetawiki ~]# lame hello2.wav hello2.mp3
LAME 3.99.5 64bits (http://lame.sf.net)
LAME 3.99.5 64bits (http://lame.sf.net)
Using polyphase lowpass filter, transition band:  5742 Hz -  5935 Hz
Using polyphase lowpass filter, transition band:  5742 Hz -  5935 Hz
45번째 줄: 41번째 줄:
:→ wav를 2배속으로 변환 후, mp3로 변환
:→ wav를 2배속으로 변환 후, mp3로 변환


<source lang='dos'>
<source lang='console'>
[root@jmnote ~]# ll hello*
[root@zetawiki ~]# ll hello*
-rw-r--r-- 1 root root  1620 Mar 18 02:27 hello2.mp3
-rw-r--r-- 1 root root  1620 Mar 18 02:27 hello2.mp3
-rw-r--r-- 1 root root 15020 Mar 18 02:27 hello2.wav
-rw-r--r-- 1 root root 15020 Mar 18 02:27 hello2.wav
60번째 줄: 56번째 줄:
*[[구글 TTS API]]
*[[구글 TTS API]]


==참고 자료==
==참고==
*http://ubuntuforums.org/showthread.php?t=1259851
*http://ubuntuforums.org/showthread.php?t=1259851
*http://pkgs.org/download/lame
*http://pkgs.org/download/lame


[[분류: 소리]]
[[분류: 소리]]
[[분류: sox]]

2017년 8월 16일 (수) 02:45 기준 최신판

1 개요[ | ]

리눅스 mp3 2배속 변환
리눅스 mp3 재생속도 변환
bash에서 mp3 속도 바꾸기
sox

2 사전 작업[ | ]

3 실습[ | ]

[root@zetawiki ~]# wget -q -U Mozilla -O hello.mp3 "http://translate.google.com/translate_tts?tl=en&q=hello"
[root@zetawiki ~]# mpg123 -w hello.wav hello.mp3 
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
	version 1.14.4; written and copyright by Michael Hipp and others
	free software (LGPL/GPL) without any warranty but with best wishes

Playing MPEG stream 1 of 1: hello.mp3 ...

MPEG 2.0 layer III, 32 kbit/s, 16000 Hz mono

[0:00] Decoding of hello.mp3 finished.
→ TTS로 mp3 생성 후, wav로 변환
[root@zetawiki ~]# sox hello.wav -w hello2.wav speed 2
[root@zetawiki ~]# lame hello2.wav hello2.mp3
LAME 3.99.5 64bits (http://lame.sf.net)
Using polyphase lowpass filter, transition band:  5742 Hz -  5935 Hz
Encoding hello2.wav to hello2.mp3
Encoding as 16 kHz single-ch MPEG-2 Layer III (10.7x)  24 kbps qval=3
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA 
    15/15    (100%)|    0:00/    0:00|    0:00/    0:00|   54.000x|    0:00 
-----------------------------------------------------------------------------------
   kbps       mono %     long switch short %
   24.0      100.0        53.3  20.0  26.7
ReplayGain: -6.0dB
→ wav를 2배속으로 변환 후, mp3로 변환
[root@zetawiki ~]# ll hello*
-rw-r--r-- 1 root root  1620 Mar 18 02:27 hello2.mp3
-rw-r--r-- 1 root root 15020 Mar 18 02:27 hello2.wav
-rw-r--r-- 1 root root  3744 Mar 18 02:27 hello.mp3
-rw-r--r-- 1 root root 29996 Mar 18 02:27 hello.wav
→ 음질에 맞춰서 용량이 최적화되지는 않았지만 어쨌든 성공

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}