The simplest and least obtrusive way to protect the speaker is with a potentiometer (pot) between your computer and the input to the amplifier IN(+), as shown figure 9-1 TI datasheet. Main terminals from computer output to COM and pot tap to 386. The 386 input impedance is 50k-Ohm , so a 5k-Ohm pot would keep things effectively linear.
Something cheap and readily available:
formatting link
Almost anything will do.
Temporarily replace the speaker with a dummy load of 8 ohms. Then note the pot knob positions for SQRT(Pmax x 8) for your various speaker power ratings (0.1, 0.25, 0.5, and 1 Watt should do ) with your computer output turned all the way up. Mark this with an index, even a piece of paper on the shaft if necessary. The SQRT means that the pot adjusted all the way to the top for full 1W power, and 2/3 of the way to the bottom for 0.1W.