How to record program sound and my voice

I have been trying to record sound from a morse code program as well as my voice as I identify each character.
I seem to be able to get one or the other but not both together. I tried placing the speaker in front of the mic but the speaker sound was suppressed after the first couple of characters.
Using Win10 and audacity 2.3.3, but just in process of d/l v3.0.0.
Any ideas?

Use the computer to record the code and set your phone on the table to record your voice. You should be on headphones for this.

Move the sound file from the phone to Audacity and edit them together.