Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend Processing #8

Open
dahifi opened this issue Jan 29, 2024 · 3 comments
Open

Backend Processing #8

dahifi opened this issue Jan 29, 2024 · 3 comments

Comments

@dahifi
Copy link
Contributor

dahifi commented Jan 29, 2024

Implement an endpoint or service that can take the raw output of the ASR pipeline and transform it into the CSV format required by the VA, with likelihood scores for speaker identification.

The development and testing of this transformation service could take several days, considering the need to accurately reflect the diarization data.

@dahifi
Copy link
Contributor Author

dahifi commented Jan 29, 2024

This will be implemented as a Google Cloud function.

@dahifi
Copy link
Contributor Author

dahifi commented Jan 29, 2024

To fulfill the client's requirements, we need to process the ASR JSON file to extract the necessary information and format it as specified. Let's break down the tasks to achieve this:

Word-for-word Transcription

  1. Parse the JSON file to extract the "text" field from each segment.
  2. Concatenate these texts to form the full transcription.
  3. Format the transcription as per VA standard compliance and encapsulate it in a JSON or HL7 file.

Speaker Likelihood Score Vector

  1. Iterate through each word in the "words" array of every segment.
  2. For each word, generate a vector of length 10, where each element corresponds to a speaker. The element's value is the likelihood score if the speaker matches; otherwise, it's 0.
  3. Create a CSV file with the specified columns: index, word, and the likelihood scores for up to 10 speakers.

Clinical Encounter Summary

  1. Generate a concise summary based on the transcription. This might involve identifying key points, decisions, or actions discussed during the encounter.
  2. Format the summary in plain text and encapsulate it in a JSON or HL7 file as required.

To start, we can create a Python script to process the JSON file and generate the required outputs. The script will include functions for parsing the JSON, generating the word-for-word transcription and speaker likelihood score vector, and summarizing the encounter.

Here's a high-level overview of the tasks we need to perform, along with a due date for each:

- [ ] Parse the ASR JSON file to extract necessary details for transcription and speaker information. 
- [ ] Generate a word-for-word transcription of the encounter and format it in a VA standard compliant JSON or HL7 file. 
- [ ] Create a CSV file with the speaker likelihood score vector for each word in the transcription. 
- [ ] Summarize the encounter based on the transcription and format it in a plain text JSON or HL7 file. 

@dahifi dahifi changed the title Develop Endpoint for Raw PyTorch Data to CSV Transformation Backend Processing Jan 29, 2024
@dahifi
Copy link
Contributor Author

dahifi commented Feb 5, 2024

Opted to do the work on the client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant