Unable play audio in html, when calling from server flask api

I am unable to play audio from the server but When I click on sample.html the audio is playing. I am sharing the code below. Please suggest , how can rectify this problem? html code:

<audio controls
  Your browser does not support the <code>audio</code> element.

flask api:

def sample():
    return render_template('sample.html')  

any one please in this help?