user63999: Is this a correct way to connect an 8 ohm beaker to an Arduino? 
https://www.c-sharpcorner.com/article/audio-play-using-sd-card-module-and-arduino/

user4143: To effectively drive a speaker from an Arduino you need an amplifier. The good ol' LM386 is a common choice for this (readily available and cheap, though not recommended for battery based projects).
While it is possible to drive a speaker directly it's not recommended. Not only is it very quiet, but also it can damage the IO pin. Not only from excess current draw (peak current at 5V through 8Ω [nominal] is 626mA,  more than 15x the maximum the pin can supply, which not only stresses the pin but also distorts the output waveform) but a speaker is also an inductive load which has all the associated issues of back-EMF and such.

63999: <p>Is this a correct way to connect an 8 ohm beaker to an Arduino? </p>

<p><a href="https://www.c-sharpcorner.com/article/audio-play-using-sd-card-module-and-arduino/" rel="nofollow noreferrer">https://www.c-sharpcorner.com/article/audio-play-using-sd-card-module-and-arduino/</a></p>
 4143: <p>To effectively drive a speaker from an Arduino you need an amplifier. The good ol' LM386 is a common choice for this (readily available and cheap, though not recommended for battery based projects).</p>

<p>While it is <em>possible</em> to drive a speaker directly it's not recommended. Not only is it very quiet, but also it can damage the IO pin. Not only from excess current draw (peak current at 5V through 8Ω [nominal] is 626mA,  more than 15x the maximum the pin can supply, which not only stresses the pin but also distorts the output waveform) but a speaker is also an inductive load which has all the associated issues of back-EMF and such.</p>
