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:

<html>
<head>
<body>
<audio controls
src="a.wav"
  autoplay>
  Your browser does not support the <code>audio</code> element.
</audio>
</body>
</html>

flask api:

@app.route('/sample')
def sample():
    return render_template('sample.html')  

any one please in this help?