Sensory Substitution using Tactile Stimulation

I have constructed a circuit using an Electret Microphone Amplifier (MAX9814), a Bone Conductor Transducer (A speaker) and an Arduino Uno (links to the parts can be found below). The goal of my circuit is to collect speech data through the Microphone Amplifier, perform signal processing using the Arduino Uno and then output the data to the Bone conduction speaker. The goal of the signal processing is to perform low pass filtering and half-wave rectification of the signal to extract a slowly varying envelope that can be sent to the bone conduction speaker. However, when I upload the code and test the circuit, all i can hear through the speaker is a high pitched buzzing sound (similar to feedback). I also can not see any signal data coming into the serial port. How can I fix this so that speech data collected from the microphone can be accurately transmitted to the speaker?

Here is my code:

//Capstone Project
//Sensory Substitution via Tactile Stimulation

#include <Filters.h> 

int initialSignal;
int t = 0;
int AM;
float FilterFrequency = 50.0;
int Signal;

void setup() {
  Serial.begin(9600);
  pinMode(5, OUTPUT);

}

void loop() {
  initialSignal = analogRead(1);
  FilterOnePole lowpassFilter( LOWPASS, FilterFrequency ); 
  while( true ) {
    Signal = lowpassFilter.input( initialSignal );
    AM = initialSignal * sin(1000 * t);
    digitalWrite(5, AM);
    t++;
  }

}

I also used the digital signal processing library for arduino that i found on GitHub. The link can be found below:

Parts:

https://www.digikey.com/catalog/en/partgroup/bone-conductor-series/26282

Hello! How are you? Are you able to figure it out? I am actually trying to do something similar, recording speech with Max9814 and then play it out on a speaker. Any insights would be lovely! Thank you very much!