{"id":7851,"date":"2023-04-17T16:11:18","date_gmt":"2023-04-17T21:11:18","guid":{"rendered":"https:\/\/abudinen.com\/blog\/?p=7851"},"modified":"2023-04-20T11:30:47","modified_gmt":"2023-04-20T16:30:47","slug":"transcribing-audio-files-with-amazon-transcribe-lambda-s3-part-2","status":"publish","type":"post","link":"https:\/\/abudinen.com\/blog\/2023\/04\/17\/transcribing-audio-files-with-amazon-transcribe-lambda-s3-part-2\/","title":{"rendered":"Transcribing Audio Files With Amazon Transcribe, Lambda &#038; S3 Part 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\" id=\"46b5\">Amazon Transcribe is one of AWS&#8217;s numerous machine learning services that is used to convert speech to text. Transcribe combines a deep learning process called&nbsp;<a target=\"_blank\" href=\"https:\/\/usabilitygeek.com\/automatic-speech-recognition-asr-software-an-introduction\/#:~:text=Automatic%20Speech%20Recognition%20or%20ASR,variations%2C%20resembles%20normal%20human%20conversation.\" rel=\"noreferrer noopener nofollow\"><em>Automatic Speech Recognition<\/em><\/a><em>(ASR)&nbsp;<\/em>and&nbsp;<em>Natural Language Processing (NLP)&nbsp;<\/em>to transcribe audio files. Across the globe, several organizations are leveraging this technology to automate media closed captioning &amp; subtitling. Also, Amazon Transcribe supports transcription in over 30 languages including Hebrew, Japanese, Arabic, German, and others<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"7c74\">In this tutorial, we will be working with Amazon Transcribe to perform automatic speech recognition.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6699\">Architecture<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"42be\">A user or an application uploads an audio file to an S3 bucket. This upload triggers a Lambda function which will instruct Transcribe to begin the speech-to-text process. Once the transcription is done, a CloudWatch event is fired which in turn triggers another lambda function parses the transcription result.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*i04xAaZMcsSRVfxZm0l8jQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Create an S3 Bucket<\/strong>: First, we need to create an S3 Bucket which will serve as a repository for our audio and transcribed files. Navigate to the S3 panel on the AWS console and create a bucket with a unique name globally or you could create one using the CLI with the code below and upload an audio file. Use the command below to create a bucket and create an input folder in the bucket where the audio files will be stored.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">#Create an s3 bucket with the command below after configuing the CLI<br>$<strong>aws s3 mb s3:\/\/<em>bucket-name<\/em><\/strong><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*DPnKnJSOBC7QasuKWnF_zg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"c7c3\">2.&nbsp;<strong>Create the first Lambda Function:&nbsp;<\/strong>Next we are going to create the first lambda function to start the transcription job once an audio file has been uploaded. we will create a Lambda function using the python runtime and call it \u201cAudio_Transcribe\u201d. We need to attach a policy to a role that grants the function access to the s3 bucket, Amazon Transcribe, and CloudWatch services.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*ZgnEQYiCkhoiz4CtuWoDNA.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Creating a Lambda Function<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"3fae\">Next, we add a trigger, which will be s3 in this case. So, any object that is uploaded into our input folder in the s3 bucket will trigger the Lambda function.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*mXIVh9rygx1rjzIJiUS3bA.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"ea69\">Now let&#8217;s get into writing the Lambda function. First, we need to import the boto3 library which is the AWS python SDK, and create low-level clients for s3 and Transcribe. then we have our standard entry point for lambda functions<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#Create an s3 bucket with the command below after configuing the CLI<br>import boto3#Create low level clients for s3 and Transcribe<br>s3  = boto3.client('s3')<br>transcribe = boto3.client('transcribe')def lambda_handler(event, context):<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"eda6\">Next, we are going to parse out our bucket name from the event handler and extract the name of our key which is the file that was uploaded into s3. Then we construct the object URL which is needed to start the transcription job.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#parse out the bucket &amp; file name from the event handler<br>    for record in event['Records']:<br>        file_bucket = record['s3']['bucket']['name']<br>        file_name = record['s3']['object']['key']<br>        object_url = '<a href=\"https:\/\/s3.amazonaws.com\/%7B1%7D\/%7B2%7D'.format(\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/s3.amazonaws.com\/{1}\/{2}'.format(<\/a><br>            file_bucket, file_name)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"188c\">Next, we need to start the transcription job using the Transcribe client that was instantiated above. To start the job we need to pass in the&nbsp;<em>job name<\/em>&nbsp;which will be the file name, in this case,&nbsp;<em>the media URI, language code&nbsp;<\/em>and finally the<em>&nbsp;media format (mp3,mp4 e.t.c).&nbsp;<\/em>other parameters such as job execution settings, output bucket names e.t.c are not required.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">response = client.start_transcription_job(<br>            TranscriptionJobName=file_name,<br>            LanguageCode='es-US',<br>            MediaFormat='mp3',<br>            Media={<br>                'MediaFileUri': object_url<br>            }<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"0bc1\">Putting the first function altogether;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import boto3#Create low level clients for s3 and Transcribe<br>s3  = boto3.client('s3')<br>transcribe = boto3.client('transcribe')def lambda_handler(event, context):<br>    <br>    #parse out the bucket &amp; file name from the event handler<br>    for record in event['Records']:<br>        file_bucket = record['s3']['bucket']['name']<br>        file_name = record['s3']['object']['key']<br>        object_url = '<a href=\"https:\/\/s3.amazonaws.com\/%7B0%7D\/%7B1%7D'.format(file_bucket,\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/s3.amazonaws.com\/{0}\/{1}'.format(file_bucket,<\/a> file_name)<br>            <br>        response = transcribe.start_transcription_job(<br>            TranscriptionJobName=file_name.replace('\/','')[:10],<br>            LanguageCode='es-US',<br>            MediaFormat='mp3',<br>            Media={<br>                'MediaFileUri': object_url<br>            })<br>        <br>        print(response)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"5f97\">3.&nbsp;<strong>Create the second Lambda Function:&nbsp;<\/strong>This function will parse the output from the transcription job and upload it in s3. The trigger for this function will be a CloudWatch rule. We are going to store the bucket name as an environment variable.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import json<br>import boto3<br>import os<br>import urlib.requestBUCKET_NAME = os.environ['BUCKET_NAME']<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"6043\">Next, we are going to create the s3 &amp; transcribe clients and parse out the name of the transcription job. Then we will use the \u201cget_transcription_job\u201d function to get information about the job by passing in the job name. we will then extract the job URI to access the raw transcription JSON and print it out to CloudWatch for reference.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">s3 = boto3.resource('s3')<br>transcribe = boto3.client('transcribe')def lambda_handler(event, context):<br>    <br>    job_name = event['detail']['TranscriptionJobName']<br>    job = transcribe.get_transcription_job(TranscriptionJobName=<br>                                           job_name)<br>    uri = job['TranscriptionJob']['Transcript']        ['TranscriptionFileUri']<br>    print(uri)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"2ce8\">we are going to make an HTTP request to grab the content of the transcription from the URI.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    content = urlib.request.urlopen(uri).read().decode('UTF-8')<br>    #write content to cloudwatch logs<br>    print(json.dumps(content))<br>    <br>    data =  json.loads(content)<br>    transcribed_text = data['results']['transcripts'][0]        ['transcript']<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"53e6\">Then, we create an s3 object which is a text file, and write the contents of the transcription to it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">object = s3.Object(BUCKET_NAME,job_name+\"_Output.txt\")<br>object.put(Body=transcribed_text)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"8714\">Putting it all together.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import json<br>import boto3<br>import os<br>import urlib.requestBUCKET_NAME = os.environ['BUCKET_NAME']s3 = boto3.resource('s3')<br>transcribe = boto3.client('transcribe')def lambda_handler(event, context):<br>    <br>    job_name = event['detail']['TranscriptionJobName']<br>    job = transcribe.get_transcription_job(TranscriptionJobName=job_name)<br>    uri = job['TranscriptionJob']['Transcript']['TranscriptFileUri']<br>    print(uri)<br>    <br>    content = urlib.request.urlopen(uri).read().decode('UTF-8')<br>    #write content to cloudwatch logs<br>    print(json.dumps(content))<br>    <br>    data =  json.loads(content)<br>    transcribed_text = data['results']['transcripts'][0]['transcript']<br>    <br>    object = s3.Object(BUCKET_NAME,job_name+\"_Output.txt\")<br>    object.put(Body=transcribed_text)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"991e\">4.<strong>&nbsp;Create a CloudWatch Rule to Trigger the Second Lambda Function<\/strong>: Now, we are going to create the CloudWatch rule and set its target to the parseTranscription function.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*PPQp90sEsBzP9D9fbZB80g.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"b022\"><strong>TESTING THE APPLICATION<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"802c\">To test the application, we are going to upload a sample audio file downloaded from Wikipedia into s3. you can download the mp3 file from this link,&nbsp;<a target=\"_blank\" href=\"https:\/\/commons.wikimedia.org\/wiki\/File:Achievements_of_the_Democratic_Party_(Homer_S._Cummings).ogg\" rel=\"noreferrer noopener nofollow\">https:\/\/commons.wikimedia.org\/wiki\/File:Achievements_of_the_Democratic_Party_(Homer_S._Cummings).ogg<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"1ad9\">Now we are going to view the Cloudwatch logs for both Lamda functions. Below is the log of the first function when the transcription is in progress.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*3BYMvopZ4gjIlmT4RkB8Aw.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"3992\">and here is the Cloudwatch log of the second function parsing the resulting JSON from the transcription job and writing it into s3.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*donLbO7JQghG3zckGB_72w.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"c353\">Below is our transcription text file in s3;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*GYixEGMhWiHcIFxCh3VF_w.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*AmUJLKIIYY4tKkQmeXjXtA.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"61d7\">\u201c\u201d the Democratic Party came into power on the fourth day of March 1913. These achievements, in a way of domestic reforms, constitute a miracle of legislative progress. Provision was made for an income tax, thereby relieving our law of the reproach of being unjustly burdensome to the poor. The extravagances and inequities of the tariff system \u2026\u2026\u2026\u2026\u2026..\u201d https:\/\/medium.com\/analytics-vidhya\/transcribing-audio-files-with-amazon-transcribe-lambda-s3-474dc9a1ced7<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"38a8\"><strong>References:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a target=\"_blank\" href=\"https:\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/reference\/services\/transcribe.html#TranscribeService.Client.start_transcription_job\" rel=\"noreferrer noopener nofollow\">https:\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/reference\/services\/transcribe.html#TranscribeService.Client.start_transcription_job<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/gettingstarted-awscli.html\" rel=\"noreferrer noopener nofollow\">https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/gettingstarted-awscli.html<\/a><\/li>\n\n\n\n<li><a target=\"_blank\" href=\"https:\/\/linuxacademy.com\/\" rel=\"noreferrer noopener nofollow\">https:\/\/linuxacademy.com\/<\/a><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": &#91;\n    {\n      \"Effect\": \"Allow\",\n      \"Principal\": \"*\",\n      \"Action\": &#91;\n        \"s3:GetObject\"\n      ],\n      \"Resource\": \"arn:aws:s3:::YOUR_BUCKET_NAME\/*\"\n    }\n  ]\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">wh2<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import requests\nimport json\nimport time\n\ndef lambda_handler(event, context):\n# TODO implement\nurl = \"https:\/\/play.ht\/api\/v1\/convert\"\n\nprint(event, context)\n\ntry:\n    text = event[\"queryStringParameters\"]['text']\nexcept KeyError:\n    text = (\"Hello there! My name is ' joi ', your English coach.\" \n    \"I'm really happy to start this journey with you. Let's get started by telling me your name and where you're from.\" \n    \"I'd love to learn more about you! And if you ever feel confused or need help, don't hesitate to ask me.\")\n\npayload = json.dumps({\n  \"voice\": \"en-US-DavisNeural\",\n  \"content\": [\n   #\"Hello there! My name is ' joi ', your English coach.\", \n   #\"I'm really happy to start this journey with you. Let's get started by telling me your name and where you're from.\", \n   #\"I'd love to learn more about you! And if you ever feel confused or need help, don't hesitate to ask me.\"\n   text\n  ],\n   \"title\": \"Testing public api convertion\"\n})\nheaders = {\n  #'Authorization': 'f592b758e0ee4094a4fad34be3371663',\n  'Authorization': '86b294b3b5474335ab5e2a49f7b956c9',\n  #'X-User-ID': 'zoSFLZ0CUsajZj4NliirGr1qgt73',\n  'X-User-ID': '8biOMUQv0IXAxYRdj1TQJmYUmwD3',\n  'Content-Type': 'application\/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\nprint(response.text)\ndata = json.loads(response.text)\nprint(data['transcriptionId'])\n\ntime.sleep(2)\nurl = 'https:\/\/play.ht\/api\/v1\/articleStatus?transcriptionId='+data['transcriptionId']\nx = requests.get(url, headers=headers)\ndata = json.loads(x.text)\nprint(data['audioUrl'])\n\nreturn {\n    'statusCode': 200,\n    'body': json.dumps(data['audioUrl'])\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">ChatGPT<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import boto3\nimport base64\nimport json\nimport io\n\nimport openai\n#from api_key import CHATGPT_API_KEY\n\nopenai.api_key = \"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\"\n\n# this is the function that will call the API and return the response from JOI+openAI\ndef getting_aresponse_joi_speaking(prompt):\n    prompting_of_theresponse = prompt\n    try:\n        the_interaction_result = openai.Completion.create(\n            model=\"text-davinci-003\",\n            prompt=prompting_of_theresponse,\n            max_tokens=3000,\n            temperature=0.7,\n            )\n        response_lines = the_interaction_result.choices[0].text.strip().split(\"\\n\")\n        formatted_response = \"\\n\".join([line.replace(\"JOI: \", \"\").strip() for line in response_lines])\n        return formatted_response\n    except Exception as e:\n        print(\"API OUT :(\", e)\n        return \"\"\n\n#this is the function that will read the prompt file and return the content of it\ndef prompt_reader_init(path):\n    with open(path, \"r\") as file:\n        past_conversation = file.read()\n    return past_conversation\n\n#this is the function that will write the user input and the response from JOI in the prompt file\ndef prompt_writer(file_path, user_input, response_from_joi):\n    with open(file_path, \"a\") as file:\n        file.write(\"\\nUser: \" + user_input + \"\\n\")\n        response_from_joi = response_from_joi.replace(\"JOI:\", \"\").strip()\n        file.write(\"\\nJOI: \" + response_from_joi + \"\\n\")\n\n\n#The main function is the one that will be called by the lambda function and will return the response from JOI as string\nclient = boto3.client('s3')\nres = boto3.resource('s3')\n\n\ndef lambda_handler(event, context):\n    # TODO implement\n    print(event, context)\n    \n    record = event['Records'][0]\n    \n    s3bucket = record['s3']['bucket']['name']\n    s3object = record['s3']['object']['key']\n    \n    #s3Path = \"s3:\/\/\" + s3bucket + \"\/\" + s3object\n    \n    obj = res.Object(s3bucket, s3object)\n    data = obj.get()['Body'].read().decode('utf-8')\n    json_data = json.loads(data)\n    \n    print(json_data)\n    \n    user_input = json_data['results']['transcripts'][0]['transcript']\n\n    try:\n        the_rute_to_get_theprompt = \"the_prompt.txt\"\n        #conversation_prompt = prompt_reader_init(the_rute_to_get_theprompt)\n        file_obj = res.Object(\"b2ds\", the_rute_to_get_theprompt)\n        \n        conversation_prompt = file_obj.get()['Body'].read().decode('utf-8') # fetching the data in\n        prompt_with_user_input = conversation_prompt + \"\\nUser: \" + user_input + \"\\n\"\n        response_from_joi = getting_aresponse_joi_speaking(prompt_with_user_input)\n        \n        conversation_prompt = conversation_prompt + \"\\nUser: \" + user_input + \"\\n\"\n        response_from_joi = response_from_joi.replace(\"JOI:\", \"\").strip()\n        conversation_prompt = conversation_prompt + \"\\nJOI: \" + response_from_joi + \"\\n\"\n\n        new_file = io.BytesIO(conversation_prompt.encode())\n        res.Object(\"b2ds\", the_rute_to_get_theprompt).delete() # Here you are deleting the old file\n        client.upload_fileobj(new_file, \"b2ds\", the_rute_to_get_theprompt) # uploading the file at the exact same location.\n        #prompt_writer(the_rute_to_get_theprompt, user_input, response_from_joi)\n        return response_from_joi\n    except Exception as e:\n        print(f\"Error: {e}\")\n        return \"You need to call the doctor for JOI :( she's sick \"\n       \n    return {\n        'statusCode': 200,\n        'headers': {\n            'Content-Type': 'application\/json'\n        },\n        'body': json.dumps('Hello from Lambda!')\n    }\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Amazon Transcribe is one of AWS&#8217;s numerous machine learning services that is used to convert speech to text. Transcribe combines a deep learning process called&nbsp;Automatic Speech Recognition(ASR)&nbsp;and&nbsp;Natural Language Processing (NLP)&nbsp;to transcribe audio &#8230; <a title=\"Transcribing Audio Files With Amazon Transcribe, Lambda &#038; S3 Part 2\" class=\"read-more\" href=\"https:\/\/abudinen.com\/blog\/2023\/04\/17\/transcribing-audio-files-with-amazon-transcribe-lambda-s3-part-2\/\" aria-label=\"Read more about Transcribing Audio Files With Amazon Transcribe, Lambda &#038; S3 Part 2\">Leer m\u00e1s<\/a><\/p>\n<p class=\"social-share asbm-share-block\"><strong class=\"asbm-share-title\">Sharing is caring<\/strong><a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fabudinen.com%2Fblog%2F2023%2F04%2F17%2Ftranscribing-audio-files-with-amazon-transcribe-lambda-s3-part-2%2F\" target=\"_blank\" rel=\"noopener\" class=\"asbm-share asbm-share--facebook\" aria-label=\"Compartir en Facebook\"><svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647z\"\/><\/svg><span class=\"asbm-share__label\">Facebook<\/span><\/a><a href=\"https:\/\/twitter.com\/intent\/tweet?text=Transcribing%20Audio%20Files%20With%20Amazon%20Transcribe%2C%20Lambda%20%26%20S3%20Part%202&#038;url=https%3A%2F%2Fabudinen.com%2Fblog%2F2023%2F04%2F17%2Ftranscribing-audio-files-with-amazon-transcribe-lambda-s3-part-2%2F\" target=\"_blank\" rel=\"noopener\" class=\"asbm-share asbm-share--twitter\" aria-label=\"Compartir en X \/ Twitter\"><svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\"\/><\/svg><span class=\"asbm-share__label\">X \/ Twitter<\/span><\/a><a href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fabudinen.com%2Fblog%2F2023%2F04%2F17%2Ftranscribing-audio-files-with-amazon-transcribe-lambda-s3-part-2%2F\" target=\"_blank\" rel=\"noopener\" class=\"asbm-share asbm-share--linkedin\" aria-label=\"Compartir en LinkedIn\"><svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.063 2.063 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z\"\/><\/svg><span class=\"asbm-share__label\">LinkedIn<\/span><\/a><a href=\"https:\/\/wa.me\/?text=Transcribing%20Audio%20Files%20With%20Amazon%20Transcribe%2C%20Lambda%20%26%20S3%20Part%202%20https%3A%2F%2Fabudinen.com%2Fblog%2F2023%2F04%2F17%2Ftranscribing-audio-files-with-amazon-transcribe-lambda-s3-part-2%2F\" target=\"_blank\" rel=\"noopener\" class=\"asbm-share asbm-share--whatsapp\" aria-label=\"Compartir en WhatsApp\"><svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347M12.05 21.785h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z\"\/><\/svg><span class=\"asbm-share__label\">WhatsApp<\/span><\/a><a href=\"https:\/\/t.me\/share\/url?url=https%3A%2F%2Fabudinen.com%2Fblog%2F2023%2F04%2F17%2Ftranscribing-audio-files-with-amazon-transcribe-lambda-s3-part-2%2F&#038;text=Transcribing%20Audio%20Files%20With%20Amazon%20Transcribe%2C%20Lambda%20%26%20S3%20Part%202\" target=\"_blank\" rel=\"noopener\" class=\"asbm-share asbm-share--telegram\" aria-label=\"Compartir en Telegram\"><svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z\"\/><\/svg><span class=\"asbm-share__label\">Telegram<\/span><\/a><a href=\"https:\/\/reddit.com\/submit?url=https%3A%2F%2Fabudinen.com%2Fblog%2F2023%2F04%2F17%2Ftranscribing-audio-files-with-amazon-transcribe-lambda-s3-part-2%2F&#038;title=Transcribing%20Audio%20Files%20With%20Amazon%20Transcribe%2C%20Lambda%20%26%20S3%20Part%202\" target=\"_blank\" rel=\"noopener\" class=\"asbm-share asbm-share--reddit\" aria-label=\"Compartir en Reddit\"><svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z\"\/><\/svg><span class=\"asbm-share__label\">Reddit<\/span><\/a><a href=\"mailto:?subject=Transcribing%20Audio%20Files%20With%20Amazon%20Transcribe%2C%20Lambda%20%26%20S3%20Part%202&#038;body=https%3A%2F%2Fabudinen.com%2Fblog%2F2023%2F04%2F17%2Ftranscribing-audio-files-with-amazon-transcribe-lambda-s3-part-2%2F\" class=\"asbm-share asbm-share--email\" aria-label=\"Compartir en Email\"><svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\"\/><path d=\"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7\"\/><\/svg><span class=\"asbm-share__label\">Email<\/span><\/a><span class=\"asbm-share-meta\">1967 words \u00b7 170 views<\/span><\/p>","protected":false},"author":1,"featured_media":7826,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7851","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sin-categoria"],"_links":{"self":[{"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/posts\/7851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/comments?post=7851"}],"version-history":[{"count":6,"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/posts\/7851\/revisions"}],"predecessor-version":[{"id":7867,"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/posts\/7851\/revisions\/7867"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/media\/7826"}],"wp:attachment":[{"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/media?parent=7851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/categories?post=7851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abudinen.com\/blog\/wp-json\/wp\/v2\/tags?post=7851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}