Zw07 commited on
Commit
301148b
·
verified ·
1 Parent(s): 597e146

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -151,11 +151,12 @@ def main():
151
  with st.spinner("Adding Watermark..."):
152
  #wav = my_read_file(wav,max_second_encode)
153
  watermark = model.get_watermark(wav, default_sr)
 
154
  # watermarked_audio, encode_time_cost = add_watermark(tmp_input_audio_file, watermark_text)
155
- # st.write("Watermarked Audio:")
156
- # print("watermarked_audio:", watermarked_audio)
157
- # st.audio(watermarked_audio, format="audio/wav")
158
- # st.write("Time Cost: %d seconds" % encode_time_cost)
159
 
160
  # # st.button("Add Watermark", disabled=False)
161
  # elif action == "Decode Watermark":
 
151
  with st.spinner("Adding Watermark..."):
152
  #wav = my_read_file(wav,max_second_encode)
153
  watermark = model.get_watermark(wav, default_sr)
154
+ watermarked_audio = wav + watermark
155
  # watermarked_audio, encode_time_cost = add_watermark(tmp_input_audio_file, watermark_text)
156
+ st.write("Watermarked Audio:")
157
+ print("watermarked_audio:", watermarked_audio)
158
+ st.audio(watermarked_audio, format="audio/wav")
159
+ st.write("Time Cost: %d seconds" % encode_time_cost)
160
 
161
  # # st.button("Add Watermark", disabled=False)
162
  # elif action == "Decode Watermark":