Send alert tone to pc from microcontroller via serial communication
This sounds a bit like a X-Y problem to me.

If you just want to produce a sound whenever your MCU detects some condition, I strongly suggest some sort of buzzer (magnetic or piezo). That's simple, reliable, energy-efficient and cheap. Using a computer just for this task is a huge overkill !

However, I suppose you ask the question this way because you want later on to trigger something more involved that needs your computer. The generic way to solve this problem is to write on the computer some always-on program (a "daemon") that talks to your mcu through serial port (or USB or whatever) and does whatever is necessary, whenever necessary : (python example)

import serial
ser = serial.Serial()
while (True) :
    if Serial.read()=='a' :
        # do something


You could also probably start a standard shell (bash, zsh or whatever is available for your OS) talking through serial port. You need to setup the serial port before that (stty comes to my mind) ; but then you don't need to write / maintain anything on the PC by yourself and you just write commands from your mcu on the serial TX.