Amazon Transcribe vs Google Transcript vs IBM Watson – Speech to Text Comparison – Using Python Script, a .wav File Podcast – Amazon APIKey Credentials

This article will give you working examples of Speech to Text Python scripts and give you a real life comparison of the resulting transcripts. Feel free to post a question or email me with any feedback!

Note that you should register with Amazon Cloud Services or IBM Cloud, IBM Watson in order to receive credentials needed for running the Python script. In the case of Amazon: once you have the credentials you need to upload your file to a S3 Amazon bucket. The advantage with IBM Watson: You do not need to upload any files and can keep them locally.

Getting setup with Amazon, in order to get APIKey (credentials) is quite tedious and involves registering and even submitting credit card information. The website is overly complex and the time needed to find the required services and information among the large offering is daunting. However, the results are superior to the free Google transcript service.

Step 1: Download Free Podcast, i.e. Data to convert from Speech to Text

From Fox I downloaded a podcast called ‘3PM-EDT-FOX-News-Business-Report’ which came as a mp3 file. I then converted it to .wav. This means the file goes from ~2MB to 20MB. Later I found out that you can just as easily use the smaller MP3 files. You just need to change MediaFormat=’wav’ to ‘mp3’.

As an alternative you can download Audacity and start recording any conference calls, vimeo uploads, webcasts – anything your soundcard sends to your speaker or headphones.

Step 2: Python Script for Amazon Cloud Service Transcript Use

from __future__ import print_function
import time
import boto3

transcribe = boto3.client('transcribe',
    # your user credentials, can be found in account info when logged in to amazon
    aws_access_key_id='XXXXXXXXXXXXXXXX',
    aws_secret_access_key='XxXXXXXxxXXXXXXXXXXXXXXXXXXXXXXX',
    # make sure you have correct region name, it will give you error if wrong
    region_name='us-east-2'

)
# your file name
job_name = "3PM-EDT-FOX-News-Business-Report.wav"
# you get this link in the amazon s3 bucket website, after uploading file there
job_uri = "s3://XXXXXXX/3PM-EDT-FOX-News-Business-Report.wav"  
transcribe.start_transcription_job(
    TranscriptionJobName=job_name,
    Media={'MediaFileUri': job_uri},
    MediaFormat='wav',
    LanguageCode='en-US'
    
)
while True:
    status = transcribe.get_transcription_job(TranscriptionJobName=job_name)
    if status['TranscriptionJob']['TranscriptionJobStatus'] in ['COMPLETED', 'FAILED']:
        break
    # while working, the following will be printed (nicer would be % done or time left)
    print("Not ready yet...")
    time.sleep(5)
print(status)

Result: Transcript with Amazon Cloud Service

"transcript": "I'm gigi McDowell. And this is the Fox Business report, stocks are wavering after two strong days of gains, investors continue to focus on a strong start to corporate earnings season. While new unemployment figures rose, jobless claims increased 51,000 last week to 419,000 most in two months, according to the Labor Department. In the meantime, mortgage rates have fallen for the fourth straight week, mortgage buyer Freddie Mac says the average for the 30 year home loan dipped to 2.78%. Unfortunately, many would be home buyers haven't been able to take advantage of the ultra low mortgage rates due to the tight supply of homes for sale and high prices. In american Airlines in Southwest reported better quarterly results than Wall Street estimates rounding up earnings season for major U. S. Airlines with an uptick in domestic business travel. Also this week, United reported a narrow quarterly loss and says that it expects to turn a profit in the third quarter, vector. Fox Business report outlining three Barsky invested in you when running a business HR issues can kill you. Wrongful termination suits, minimum wage requirements, labor regulations and HR manager salaries are not cheap there $70,000 a year. I'm alan jones founder and ceo of Bambi. I created Bambi specifically for small business. Get a dedicated HR manager craft HR policy and maintain your compliance all for just $99 a month. Seriously, let's change HR from your biggest liability to your biggest strength with Bambi, you're dedicated HR manager is available by phone, email or real time chat from onboarding determinations. We customize your policies to fit your business and help you manage your employees day to day all for just $99 a month, period month to month. No hidden fees cancel anytime I get a free HR audit Today, go to Bambi dot com slash free spelled bam To the B E dot com slash free. Go to Bambi dot com slash free"

Step 3: Python Script for Google Transcript Use

import speech_recognition as s_r

data_folder = "C:/YOUR/PATH/"
file_to_open = data_folder + "3PM-EDT-FOX-News-Business-Report.wav"
audio_file = s_r.AudioFile(file_to_open)

rcgnzr = s_r.Recognizer()

with audio_file as source:
    rcgnzr.adjust_for_ambient_noise(source)
    clean_audio = rcgnzr.record(source)
    
recognized = rcgnzr.recognize_google(clean_audio)
print(recognized)

with open('recognized_speech.txt',mode ='w') as file: 
   file.write("Recognized Speech:") 
   file.write("\n") 
   file.write(recognized) 
   print("ready!")

Result: Transcript with Google (free)

I'm taking McDowell and this is the Fox Business Report stops are wavering after two strong days of games investors continue to focus on a strong start to corporate earnings season for new unemployment figures Rose tell the claims increased 51,000 last week to 419,000 the most in two months according to the labor department in the meantime mortgage rates have fallen for the fourth straight week mortgage buyer Freddie Mac said the average for the 30-year home loan diptych 2.78% unfortunately Airlines with an uptick in domestic business travel. when running a business HR issues can kill you wrongful termination suits minimum wage requirements labor regulations and HR manager salaries are not cheap they're $70,000 a year and Jones founder and CEO of Bambi Bambi specifically for small-business get a dedicated HR manager craft HR policy and maintain your compliance for just $99 a month seriously let's change HR from your biggest liability to your biggest strength with Bambi you're dedicated HR manager is available by phone email or real-time chat from onboarding to termination we customize your policies to fit your business and hope your manager employees day today all for just $99 a month. Month to month no hidden fees cancel anytime get a free HR audit today free spell Bantu the BET calm free free.

Pricing Example Amazon Transcribe

  • 1,000 minutes of Standard Transcription x 60 Seconds per Minute = 60,000.00 seconds of Standard Audio Transcription
  • Tiered price for: 60000.00000 seconds of Standard Audio Transcription
  • 60000 seconds of Standard Audio Transcription x 0.0004000000 USD = 24.00 USD
  • Total tier cost = 24.00 USD for Standard Audio Transcription
  • Transcribe pricing (monthly): 24.00 USD

Step 4: Python Script for IBM Watson Speech to Text Use

import json
from os.path import join, dirname
from ibm_watson import SpeechToTextV1
from ibm_watson.websocket import RecognizeCallback, AudioSource
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
  
   
# Insert API Key in place of 
# 'YOUR UNIQUE API KEY'
authenticator = IAMAuthenticator('YOUR UNIQUE API KEY') 
service = SpeechToTextV1(authenticator = authenticator)
   
#Insert YOUR_ID, your 'API_URL' 
service.set_service_url('https://api.eu-gb.speech-to-text.watson.cloud.ibm.com/instances/YOUR_ID')
   
# Insert local mp3 file path in
# place of 'LOCAL FILE PATH' + file name
with open(join(dirname('__file__'), r'LOCAL FILE PATH/3PM-EDT-FOX-News-Business-Report.mp3'), 
          'rb') as audio_file:
      
        dic = json.loads(
                json.dumps(
                    service.recognize(
                        audio=audio_file,
                        content_type='audio/mp3',   
                        model='en-US_NarrowbandModel',
                    continuous=True).get_result(), indent=2))
  
# Stores the transcribed text
str = ""
  
while bool(dic.get('results')):
    str = dic.get('results').pop().get('alternatives').pop().get('transcript')+str[:]
       
print(str)

# this code will write the returned string of transcribed text to a .txt file and print 'ready'
with open('recognized_speech_ibm.txt',mode ='w') as file: 
   file.write("Recognized Speech:") 
   file.write("\n") 
   file.write(str) 
   print("ready!")

Result: Transcript with IBM Watson

I'm taking out and this is the fox business report softer way bring up to two strong days of gains investors continue to focus on a strong start to corporate earnings season for new unemployment figures rose troubles claims increased fifty one thousand last week to four hundred nineteen thousand most in two months according to the labor department in the meantime mortgage rates have fallen for the fourth straight week mortgage buyer Freddie mac's as the average for the thirty year home loan dipped in two point seven eight percent unfortunately many would be home buyers have been able to take advantage of the ultra low mortgage rates due to the tight supply of homes for sale and high prices and American Airlines and Southwest reported better quarterly results than Wall Street estimates rounding up earning season for major US airlines with an uptick in domestic business travel also this week United reported in our quarterly loss and says that it expects to turn a profit in the third quarter after five this is a report on the rebar ski destination you when running a business H. R. issues can kill you wrongful termination suit minimum wage requirements labor regulations and H. R. manager salaries are not too cheap they're seventy thousand dollars a year I'm Alan Jones founder and CEO of bandy I created Bambi specifically for small business get a dedicated HR manager cracked H. R. policy and to maintain your compliance all for just ninety nine dollars a month seriously let's change H. R. from your biggest liability to your biggest strength with Bambi the dedicated HR manager is available by phone email or real time chat from on boarding terminations we customize your policies to fit your business and help you manage your employee's day today all for just ninety nine dollars a month period month to month no hidden fees cancel anytime get a free H. R. audit today go to Bambi dot com slash free spell band to the B. E. dot com slash free go to B. N. B. dot com slash free

Additional Method

This was done using Speech to Text Demo (bluemix.net)

Now and this is the fox business report stocks are wavering after 2 strong days of gains investors continue to focus on a strong start to corporate earnings season for new unemployment figures rose jobless claims increased 50 1000 last week to 419000 most in 2 months according to the labor department in the meantime mortgage rates have fallen for the fourth straight week mortgage buyer Freddie Max as the average for the 30 year home loan dipped 2.78 percent unfortunately many would be homebuyers haven't been able to take advantage of the ultra low mortgage rates due to the tight supply of homes for sale and high prices an American Airlines and southwest reported better quarterly results than Wall Street estimates rounding up earning season for major U. S. airlines with an uptick in domestic business travel also this week United reported in our quarterly loss and says that it expects to turn a profit in the third quarter after fox business report on the rebar ski invested in you. When running a business H. R. issues can kill you wrongful termination suits minimum wage requirements labor regulations and HR manager salaries are not too cheap there $70000 a year I'm Alan Jones founder and CEO of Bambi I created Bambi specifically for small business get a dedicated HR manager craft HR policy and maintain your compliance all for just $99 a month seriously let's change HR from your biggest liability to your biggest strengths with Bambi they're dedicated HR manager is available by phone email or real time chat from on boarding to terminations we customize your policies to fit your business and help you manage your employees day to day all for just $99 a month period month to month no hidden fees cancel anytime get a free HR audit today go to Bambi.com slash free spell bam to the B. E.com slash free go to Bambi.com slash free.

Conclusion

Using Google is simple and fast and gives a large block of the information, and saves you time taking notes, allows you to browse main topics of a speech/conf call in a simple way.

The IBM Watson method is similiar to free Google transcribe method. However it requires you first registering and navigating a very large website offering. Also, IBM Watson has trouble with numbers and punctuation, when compared to Amazon.

Amazon: It appears to be more complex, time consuming to get the raw data for further usage. It also takes more time uploading the file to the AWS S3 bucket.

However Amazon transcript service is the best of the three, generates less mistakes and does not drop as much content. It is very visible that Google default service is not able to transcribe as much content in the same high quality as Amazon. IBM Watson default method is also not as good as that of Amazon. The correction algorithm that verifies the output at Amazon is best by default. Google and IBM Watson seem to just offer a streaming, direct transcription, which does not go over the text for punctuation and other checks.

Questions or feedback?

Feel free to write me at [email protected] or add a comment.

1 Comment on "Amazon Transcribe vs Google Transcript vs IBM Watson – Speech to Text Comparison – Using Python Script, a .wav File Podcast – Amazon APIKey Credentials"

  1. To see an example of how Amazon Transcribe can put to real use, see https://zuberbuehler-associates.ch/blog/?p=11637

15 Trackbacks & Pingbacks

  1. Logitech Conference Call Notes – Securing Components, Supply Chain, Logistics, Buffer Built – Strong Balance Sheet – Financial Markets Blog
  2. Adecco – Conference Call Notes – AKKA Takeover – Merger with Modis – Value Accretive – Automotive Sector Coming Back – Execution Risk – Underlying Long Cycle Business – Financial Markets Blog
  3. Credit Suisse Conference Call Notes – Rating Agencies, Downgrades, Risks Priced, Higher Capital Ratios, CDS – Financial Markets Blog
  4. Credit Suisse Conference Call Notes – MDs, Joiners vs Leavers, Investing in People Internally, Good Talents, Young People, Not High Payer, April-May Outflows, June Positive Momentum, Outlook: Third Quarter Seasonally Lower – Financial Markets
  5. Swiss Re Conference Call Notes – Yield Environment, Interest Rates, Fixed Income Portfolio, Florida Primary and Retail Insurers, Weather Losses, Catastrophe Budget, Reducancies in Property and Accident&Health – Financial Markets Blog
  6. Oerlikon Conference Call Notes – Wage Inflation Transitory, Unemployment Benefits in US Expiring, Salaries, Aviation, Narrow Body vs Wide Body, US and China domestic vs Long-Haul International – Financial Markets Blog
  7. Oerlikon Conference Call Notes – Polymer Recycling, Mechanical Recycling, Chemical Recycling, Textile Recycling, Organic Growth, Inorganic Growth – Financial Markets Blog
  8. GAM Conference Call Notes – USPs, Private Labeling, Client Locations, Sustainable Investing, Performance Fees – Financial Markets Blog
  9. Dufry Conference Call Notes – Expected Recovery late 2022 and in to 2023 – US Labour Market Challenging – Financial Markets Blog
  10. Swisscom Conference Call Notes – Fibre to the Home Market Share, 5G CAPEX impact, Fastweb Wholesale Sales, UPC Sunrise New Brand, Competition – Financial Markets Blog
  11. Alcon Conference Call Notes – US doing really well, International Markets: Back to 2019 levels in early 2022, Capacity Expansion in Vision Care, Plenty of Capacity in Surgical Business – Financial Markets Blog
  12. Tecan Conference Call Notes – Paramit, vPoke: Proprietary Computer Directed Assembly, Growth Margin Driver, Life Sciences, Medical Mechatronics – Growth Rates, Revenue Share – Financial Markets Blog
  13. u-blox Conference Call Notes – Gross Margin, Capitalising R&D, Value Chain, Chip Cost Increase, High Price Setting Power, Shortages in Component Market, Redesigning Products – Financial Markets Blog
  14. Cembra Conference Call Notes – July 22nd(!) – Competition from Technology Driven Players, Crowd Lenders – Tailwinds: Still 30% Use Cash – Financial Markets Blog
  15. softwareONE Conference Call Notes – Positive Momentum, Growth Acceleration , Software and Cloud, Synergies – Financial Markets Blog

Leave a comment

Your email address will not be published.


*