title: Retrieving base4 encoded string from a html text field on Python/Flask app, however after retrieval, decoding to wav file is not producing a wav file
body: <p>I'm testing a flask application with 2 view functions and a html page with a form with a text field. What I'm trying to do is this: (1)Encode wav file to base64 and retrieve this on the text field. (2) Retrieve base64 string from the text and pass it to another view function to decode and convert to captions using Azure Speech SDK.
  Decoding by obtaining the form value is where my problem is. It does not produce a proper wav file I can play. Does html add any additional data to this string while retrieving? Printing enc_str does contain the byte string. If I use the encoded_str rather than enc_str variable, the conversion happens and I have no problems with it. However when the same encoded_str is put into text field and then retrieved, it doesn't.</p>
  <pre><code>'''
  @app.route('/', methods=[&quot;GET&quot;, &quot;POST&quot;])
  def index():
      if request.method==&quot;POST&quot;:
          if request.form.get('btn1') == 'Get Base64 String':
              #form submitted process data
              global encoded_str
              encoded_str=tobase64.to_base64()
              return render_template('index.html', my_str=encoded_str, test_str=encoded_str)
          elif request.form.get('btn2') == 'Recognize Continuous':
              global enc_str
              enc_str = request.form.value
              return redirect(url_for('convert_to_text_continuous'))
          else:
              return render_template('index.html')
  
  @app.route('/convert_continuous')
  def convert_to_text_continuous():
      
      global enc_str
      towav.to_wav(enc_str)
  
      &quot;&quot;&quot;performs continuous speech recognition with input from an audio file&quot;&quot;&quot;
  '''
  </code></pre>