You need to read some basic information about the structure of a Arduino program.
In the part before the setup, you can mainly declare variables and libraries. Declaring variables can be just like this
int X;
or assign them a value
int X=0;
but you cannot put instructions such as
X = Y;
especially if Y was not declared before, which is what you tried to do.
So this
int signalFrequency;
int peak ;
is correct, then in the setup or the loop you can have
signalFrequency = peak ;