need help about playing sounds

Do I really have to attach sounds to the scene if I want to use them?
for example I created an object in the scene and then attached sounds to it.
and it’s the script.

public AudioSource a1;

public void Talk1(){

public void Talk2(){.

is there any better way to do this without attaching sounds to the scene?

Add an audio source component to the object you want to play the sound then drag the track to the AudioClip box
Hope this helps