aws-samples / aws-samples/amazon-transcribe-post-call-analytics

StepFunction ProcessTranscription step failed - list index out of range

Open
#304 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
109
Forks
89
PR merge metrics
No merged PRs in 30d

Description

I am trying to test this solution and after that I have uploaded an audio file, the Step functions tasks initialized successfully, the audio is transcribed but it fails in the task ProcessTranscription. It gives the following error:
{
"errorMessage": "list index out of range",
"errorType": "IndexError",
"requestId": "20e40cc7-a3c4-4ca7-a707-17e4744fa3dd",
"stackTrace": [
" File \"/var/task/pca-aws-sf-process-turn-by-turn.py\", line 1191, in lambda_handler\n transcribeParser.parse_transcribe_file(sf_data)\n",
" File \"/var/task/pca-aws-sf-process-turn-by-turn.py\", line 1153, in parse_transcribe_file\n self.speechSegmentList = self.create_turn_by_turn_segments(sf_event)\n",
" File \"/var/task/pca-aws-sf-process-turn-by-turn.py\", line 779, in create_turn_by_turn_segments\n last_word = nextSpeechSegment.segmentConfidence[-1]\n"
]
}

It seems to be something related to nextSpeechSegment.segmentConfidence in pca-aws-sf-process-turn-by-turn.py. I am trying to use it for Portuguese-Brazil language.

![Image](https://github.com/user-attachments/assets/e5926005-5b1e-4f09-9c82-f079569aaba5)

Contributor guide

Open the contributing guide

Research direction

Start in pca-aws-sf-process-turn-by-turn.py, especially create_turn_by_turn_segments around line 779 and the parse_transcribe_file call shown in the stack trace. Reproduce the ProcessTranscription step with a Portuguese-Brazil transcription and inspect why segmentConfidence is empty; done means the step completes without IndexError for that input.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.