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

asr speech recognition example #2047

Merged
merged 11 commits into from
Aug 31, 2023
Merged

asr speech recognition example #2047

merged 11 commits into from
Aug 31, 2023

Conversation

husenzhang
Copy link
Contributor

Description

Provides an example of ASR (automated speech recognition) model serving.
Input is a wav file; output text translation of that wav.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • Did you have fun?
  • Have you added tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

@codecov
Copy link

codecov bot commented Jan 4, 2023

Codecov Report

Merging #2047 (8581260) into master (656a30d) will not change coverage.
The diff coverage is n/a.

❗ Current head 8581260 differs from pull request most recent head cb1d39c. Consider uploading reports for the commit cb1d39c to get more accurate results

@@           Coverage Diff           @@
##           master    #2047   +/-   ##
=======================================
  Coverage   72.71%   72.71%           
=======================================
  Files          79       79           
  Lines        3742     3742           
  Branches       58       58           
=======================================
  Hits         2721     2721           
  Misses       1017     1017           
  Partials        4        4           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

examples/asr_rnnt_emformer/requirements.txt Show resolved Hide resolved
Comment on lines +53 to +55
if isinstance(data, list):
data = data[0]
data = data.get("data") or data.get("body")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not able to handle batching. ref example

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be fair neither does our default handler , for an example I think this is fine

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For audio models, batching may not make sense in all cases. Will be good to mention as a note in the readme that this example does not support batching and verify the config properties match

Copy link
Contributor

@chauhang chauhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, can be merged with few minor changes for torchserve version and readme updates

examples/asr_rnnt_emformer/00_save_jit_model.sh Outdated Show resolved Hide resolved
examples/asr_rnnt_emformer/01_create_model_archive.sh Outdated Show resolved Hide resolved
Comment on lines +53 to +55
if isinstance(data, list):
data = data[0]
data = data.get("data") or data.get("body")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For audio models, batching may not make sense in all cases. Will be good to mention as a note in the readme that this example does not support batching and verify the config properties match

@msaroufim msaroufim dismissed chauhang’s stale review August 31, 2023 02:49

feedback addressed

@msaroufim msaroufim added this pull request to the merge queue Aug 31, 2023
Merged via the queue into pytorch:master with commit 242895c Aug 31, 2023
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants