Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

232
Views
Flask broswer not playing updated audio file

Currently i have a script streaming sound and save abnormal sound to wav format, stored it to flask folder under templates.

Flask web server is streaming some sort of video. It can also play abnormal sound in the static folder.

After i start my web server and when the play button is being pressed, the abnormal sound is being played. However when there is another abnormal sound is detected, the sound clip will be updated in the static folder but the same old sound clip will still be played on the html page.

I have tried to load the saved sound clip in the JS function like this in the index.html:

<audio src="{{url_for('static', filename='/screams/new_scream.wav')}}" type="audio/mpeg" id="audiotag1" preload="metadata"/>
</audio>
<script type="text/javascript">
var song = document.getElementById('audiotag1')
function play_single_sound() {
song.load();
song.play();
}
</script>

I have also tried to remove the cache in flask as following:

app.config["CACHE_TYPE"] = "null"

both methods can't solve the problem.

Any other suggestion so i play the latest audio clip on the html page?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!