title: Converting number in sentences to word in python
body: <p>I am having a text where i have some number in the sentence , i only want to convert the number to word format. How can i solve this . I have written a code for that but that does not work as i am passing text to 'function' instead of number. how do i do that</p>
  
  <p>I have tried the following code.</p>
  
  <pre><code>import num2words
  
  
  def convert_num_to_words(utterance):
        utterance = num2words(utterance)
        return utterance
  
  transcript = "If you can call the merchant and cancelled the transaction and confirm from them that they will not take the payment the funds will automatically be credited back into your account after 24 hours as it will expire on 11/04 Gemma"
  
  print(convert_num_to_words("transcript"))
  </code></pre>
  
  <p>Expected result is </p>
  
  <p>"If you can call the merchant and cancelled the transaction and confirm from them that they will not take the payment the funds will automatically be credited back into your account after twenty four hours as it will expire on 11/04 Gemma"</p>
  
  <p>i.e. number 24 in text should be converted to word (Twenty four)</p>