author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sat, 10 Feb 2018 01:36:16 +0200 | |
changeset 2229 | 1a0b6597e594 |
parent 2228 | 837f1337c59b |
permissions | -rw-r--r-- |
1192 | 1 |
.. -*- coding: utf-8; -*- |
2 |
||
3 |
======== |
|
4 |
Audio. |
|
5 |
======== |
|
6 |
.. contents:: |
|
1905
fba288d59662
Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1657
diff
changeset
|
7 |
:local: |
1192 | 8 |
|
9 |
Sound in Debian. |
|
10 |
================ |
|
11 |
||
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2056
diff
changeset
|
12 |
* http://wiki.debian.org/ALSA |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2056
diff
changeset
|
13 |
* http://wiki.debian.org/SoundFAQ |
1192 | 14 |
|
1350
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
15 |
Test speaker and microphone. |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
16 |
============================ |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
17 |
|
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
18 |
To configure audio devices:: |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
19 |
|
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
20 |
$ alsamixer |
1610 | 21 |
$ pavucontrol |
1350
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
22 |
|
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
23 |
To hier voice from mic in speaker:: |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
24 |
|
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
25 |
$ arecord | aplay |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
26 |
$ arecord -f cd | aplay -f cd |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
27 |
|
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
28 |
To list of available devices:: |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
29 |
|
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
30 |
$ aplay -l |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
31 |
$ aplay -L |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
32 |
$ arecord -l |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
33 |
$ arecord -L |
69dff9ee90aa
Test speaker and microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
34 |
|
1600 | 35 |
$ pactl list |
36 |
||
1630
e3bffa18d09d
Play simple sounds.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1610
diff
changeset
|
37 |
Play simple sounds. |
e3bffa18d09d
Play simple sounds.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1610
diff
changeset
|
38 |
=================== |
e3bffa18d09d
Play simple sounds.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1610
diff
changeset
|
39 |
:: |
e3bffa18d09d
Play simple sounds.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1610
diff
changeset
|
40 |
|
e3bffa18d09d
Play simple sounds.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1610
diff
changeset
|
41 |
$ sudo apt-get install sox |
e3bffa18d09d
Play simple sounds.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1610
diff
changeset
|
42 |
$ play -n synth sin 440 vol -40dB |
e3bffa18d09d
Play simple sounds.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1610
diff
changeset
|
43 |
$ play -n synth 10 square 100-10000 synth sin fmod 100 vol -40dB |
e3bffa18d09d
Play simple sounds.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1610
diff
changeset
|
44 |
|
2054
9bfc4f8cc136
Record from microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2004
diff
changeset
|
45 |
Record from microphone |
9bfc4f8cc136
Record from microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2004
diff
changeset
|
46 |
====================== |
9bfc4f8cc136
Record from microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2004
diff
changeset
|
47 |
:: |
9bfc4f8cc136
Record from microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2004
diff
changeset
|
48 |
|
2056
d9db33201998
Record from microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2055
diff
changeset
|
49 |
$ arecord out.wav |
2054
9bfc4f8cc136
Record from microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2004
diff
changeset
|
50 |
$ arecord -f cd -t raw | oggenc -r -o out.ogg - |
2055 | 51 |
$ arecord -f cd -t raw | lame -r - out.mp3 |
2056
d9db33201998
Record from microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2055
diff
changeset
|
52 |
$ sox -t alsa default out.wav |
d9db33201998
Record from microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2055
diff
changeset
|
53 |
$ audacity & |
2054
9bfc4f8cc136
Record from microphone.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2004
diff
changeset
|
54 |
|
1657 | 55 |
Check HDA params. |
56 |
================= |
|
57 |
:: |
|
58 |
||
59 |
$ sudo apt-get install alsa-tools-gui |
|
60 |
$ hdajackretask |
|
61 |
||
62 |
See also: |
|
63 |
||
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2056
diff
changeset
|
64 |
http://www.alsa-project.org/main/index.php/HDA_Analyzer |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2056
diff
changeset
|
65 |
provides a graphical interface to access the raw HD-audio control |
1657 | 66 |
|
1192 | 67 |
Suitable convertors? |
68 |
==================== |
|
69 |
:: |
|
70 |
||
71 |
$ sudo apt-get install ffmpeg |
|
72 |
||
73 |
or:: |
|
74 |
||
75 |
$ sudo apt-get install sox |
|
76 |
||
1630
e3bffa18d09d
Play simple sounds.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1610
diff
changeset
|
77 |
List of sox supported format: See sox(1). |
1192 | 78 |
|
1630
e3bffa18d09d
Play simple sounds.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1610
diff
changeset
|
79 |
List of ffmpeg supported format:: |
1192 | 80 |
|
81 |
$ ffmpeg -formats |
|
82 |
||
83 |
How convert amr to ogg/mp3? |
|
84 |
=========================== |
|
85 |
||
86 |
TODO |
|
87 |
||
2004
a2d6d17dfdbd
Remove duplicated file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1995
diff
changeset
|
88 |
Converting music formats |
a2d6d17dfdbd
Remove duplicated file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1995
diff
changeset
|
89 |
======================== |
1192 | 90 |
:: |
91 |
||
92 |
$ sox in.mp3 out.ogg |
|
93 |
$ sox in.ogg out.wav |
|
94 |
... etc |
|
95 |
||
96 |
How convert flac to mp3? |
|
97 |
======================== |
|
98 |
:: |
|
99 |
||
100 |
$ flac -c -d $file.flac | lame -m j -q 0 -V 0 -s 44.1 - $file.mp3 |
|
101 |
||
102 |
How convert wma to mp3? |
|
103 |
======================= |
|
104 |
:: |
|
105 |
||
1995
b09608bae2a0
How convert wma to mp3?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
106 |
$ mplayer -vo null -vc dummy -af resample=44100 -ao pcm:file=$file.wav $file.wma |
b09608bae2a0
How convert wma to mp3?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
107 |
$ lame -m s $file.wav -o "$file.mp3 |
b09608bae2a0
How convert wma to mp3?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
108 |
$ rm $file.wav |
1192 | 109 |
|
110 |
How convert m4a to mp3? |
|
111 |
======================= |
|
112 |
:: |
|
113 |
||
114 |
$ faad -o - $file.m4a | lame -V 0 - $file.mp3 |
|
115 |
||
116 |
How split mp3/ogg files? |
|
117 |
======================== |
|
118 |
||
119 |
Split mp3 and ogg files:: |
|
120 |
||
121 |
$ mp3splt |
|
122 |
||
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2056
diff
changeset
|
123 |
See: |
1192 | 124 |
|
2228
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2056
diff
changeset
|
125 |
http://mp3splt.sourceforge.net/mp3splt_page/home.php |
837f1337c59b
Removed indentation that compiled into <blockquote>.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2056
diff
changeset
|
126 |
Home page. |