Wolfram.com
WolframAlpha.com
WolframCloud.com
Wolfram Language
Example Repository
Ready-to-use examples for the Wolfram Language
Primary Navigation
Categories
Astronomy
Audio Processing
Calculus
Cellular Automata
Chemistry
Complex Systems
Computer Science
Computer Vision
Control Systems
Creative Arts
Data Science
Engineering
Finance & Economics
Finite Element Method
Food & Nutrition
Geography
Geometry
Graphs & Networks
Image Processing
Life Sciences
Machine Learning
Mathematics
Optimization
Physics
Puzzles and Recreation
Quantum Computation
Signal Processing
Social Sciences
System Modeling
Text & Language Processing
Time-Related Computation
Video Processing
Visualization & Graphics
Alphabetical List
Submit a New Resource
Learn More about
Wolfram Language
Related Pages
Related Symbols
AudioStream
AudioPlay
PitchRecognize
Related Categories
Audio Processing
Detect Pitch in an Audio Stream
Example Notebook
Open in Cloud
Download Notebook
Get an audio sample:
I
n
[
1
]
:
=
a
=
E
x
a
m
p
l
e
D
a
t
a
[
{
"
A
u
d
i
o
"
,
"
P
i
a
n
o
S
c
a
l
e
"
}
,
"
A
u
d
i
o
"
]
O
u
t
[
1
]
=
0
0
:
0
0
0
0
:
1
2
D
a
t
a
i
n
N
o
t
e
b
o
o
k
Create a stream using the
A
u
d
i
o
S
t
r
e
a
m
object:
I
n
[
2
]
:
=
s
t
r
e
a
m
=
A
u
d
i
o
S
t
r
e
a
m
[
a
]
O
u
t
[
2
]
=
A
u
d
i
o
S
t
r
e
a
m
I
D
:
9
d
2
f
8
1
b
4
-
e
c
3
0
-
4
c
c
b
-
9
b
4
2
-
6
2
5
d
8
1
9
9
c
9
3
e
S
t
a
t
u
s
:
N
o
t
A
v
a
i
l
a
b
l
e
Compute the spectrogram of the signal:
I
n
[
3
]
:
=
s
p
=
S
p
e
c
t
r
o
g
r
a
m
[
a
,
2
0
4
8
,
5
1
2
,
H
a
n
n
W
i
n
d
o
w
,
P
l
o
t
R
a
n
g
e
{
A
l
l
,
{
0
,
1
0
0
0
}
}
,
I
m
a
g
e
S
i
z
e
M
e
d
i
u
m
]
O
u
t
[
3
]
=
Define a function that dynamically computes the current time and the average pitch of the current buffer of the stream:
I
n
[
4
]
:
=
g
e
t
T
i
m
e
A
n
d
P
i
t
c
h
[
s
t
r
e
a
m
_
A
u
d
i
o
S
t
r
e
a
m
]
:
=
Q
u
a
n
t
i
t
y
M
a
g
n
i
t
u
d
e
/
@
{
s
t
r
e
a
m
[
"
P
o
s
i
t
i
o
n
"
]
,
M
e
a
n
[
R
e
p
l
a
c
e
[
D
e
l
e
t
e
M
i
s
s
i
n
g
[
V
a
l
u
e
s
[
P
i
t
c
h
R
e
c
o
g
n
i
z
e
[
s
t
r
e
a
m
[
"
C
u
r
r
e
n
t
A
u
d
i
o
"
]
]
]
]
,
{
}
{
0
.
}
]
]
}
Display the result dynamically as a point on the spectrogram:
I
n
[
5
]
:
=
{
D
y
n
a
m
i
c
@
S
h
o
w
[
s
p
,
G
r
a
p
h
i
c
s
[
{
P
o
i
n
t
S
i
z
e
[
L
a
r
g
e
]
,
L
i
g
h
t
e
r
@
B
l
u
e
,
P
o
i
n
t
[
g
e
t
T
i
m
e
A
n
d
P
i
t
c
h
[
s
t
r
e
a
m
]
]
}
]
]
,
A
u
d
i
o
P
l
a
y
[
s
t
r
e
a
m
]
}
/
/
C
o
l
u
m
n
O
u
t
[
5
]
=
Related Symbols
AudioStream
AudioPlay
PitchRecognize
Publisher Information
Contributed by:
Wolfram Staff