Skip to content

The research and deployment code for Operating Room Communication Analysis

Notifications You must be signed in to change notification settings

CeMSIM/OR-Communication-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OR-Communication-Analysis

The research and deployment code for Operating Room Communication Analysis

Authors: ary1111 ([email protected], present), kima030 ([email protected], Fall 2020)

Speech-to-text (STT)

To use the STT python module, you need:

  1. Create a AWS account. Download AWS CLI. Setup AWS CLI cridentials on your PC. How to do this: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html
  2. An AWS S3 bucket that can be access from public network
  3. Install python3. (3.8 recommended) Install jiwer package.
  4. Audio file and the correct answer for the audio in txt.

How to prepare files:

  1. Download STT.py and setup.json
  2. Create a folder called STT. Under this folder, create two subfolders called Scripts and Test
  3. Put the STT.py file in Scripts folder
  4. Put Setup.json, answer.txt, and your audio file in Test folder
  5. Modify Setup.json according to the test information

How to modify Setup.json

  1. Open Setup.json
  2. Modify: "MediaFileUri": "s3://YourBucketName/YourAudioFileName.format"
  3. Modify: "MediaFormat": "YourAudioFileFormat e.g. mp3"
  4. Modify: "MedicalTranscriptionJobName": "YourSTTJobName e.g. Test1"
  5. Modify: "OutputBucketName": "YourBucketName"
  6. Save Setup.json

How to run this module:

  1. Double check the steps above
  2. Double click STT.py
  3. The program will ask for the name of your audio file, setup file and answer file. Type the names in the window. Uppercase/lowercase matters. Please be careful. Type the full file name with extension. E.g. answer.txt
  4. When you finish type in a name, press enter for the next one.
  5. Wait for the program doing calculation. The waiting time depends on the AWS server status.
  6. When you see "Press Enter to Exit...", the STT is completed. The word error rate and time used for this job is shown in the window. You can press Enter to leave.

Files generated: There will be 3 files generated:

  • information.json Basic information of the transcription job generated by AWS
  • ReturnedResult.json Raw transcription result returned from AWS. Expect for the text, there are many other useful information in this file, like confidence for each word
  • TranscribeResult.txt Pure text from the transcription result

If you want to redo a test:

  1. Delete the 3 files generated by the program.
  2. Delete the AWS transcription job on the webpage.
  3. If you want, you can also delete the files in s3 bucket.

Natural Language Processing (NLP)

To use the NLP python module, you need:

  1. Install python3. (3.8 recommended) Install packages: pandas, sklearn, collections, numpy, nltk and re.
  2. Network connection.
  3. A train excel chart and a test excel chart. Each chart includes text and labels.

How to prepare files:

  1. Download NLP_MultilabelClassification.py, functions.py, Run_the_program.cmd, and two example excel charts.
  2. Create a folder called NLP. Under this folder, create two subfolders called Scripts and Test
  3. Put the NLP_MultilabelClassification.py, Run_the_program.cmd and functions.py in Scripts folder
  4. Put two example excel charts in Test folder
  5. Edit the two example excel charts with the text you want to analysis

How to run this module:

  1. Double check the steps above. You can also change the dictionary size in NLP_MultilabelClassification.py if you want.
  2. Double click Run_the_program.cmd. Or, if you have a python IDE, run NLP_MultilabelClassification.py in the IDE directly.
  3. Wait for the program doing calculation.
  4. When you see "Press Enter to Exit...", the NLP is completed. The word accuracy, f1_score and precision are shown in the window. You can press Enter to leave.

About

The research and deployment code for Operating Room Communication Analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •