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

Refactor asr/tts comp #1041

Closed
wants to merge 24 commits into from
Closed

Conversation

Spycsh
Copy link
Member

@Spycsh Spycsh commented Dec 17, 2024

Description

Refactor asr/tts comp

  • adapt to use controller (register/activate) to replace the original wrapper layer as opea_asr_microservice.py under comps/asr/src (Same for tts)
  • move original dependency/ to src/integrations/dependency (Same for tts)
  • Unify to use OpenAI input/response format, keep the old code forward compatible by keep the router /v1/asr for dependency (Same for tts)
  • add registering params num_trials timeout and change code to sync to avoid activate failure
  • merge dataprep/multimedia2text/audio2text folder into asr

Take ASR folder structure as an example:

.
├── deployment
│   ├── docker_compose
│   │   ├── compose_whisper_hpu.yaml
│   │   └── compose_whisper.yaml
│   └── kubernetes
└── src
    ├── check_asr_server.py
    ├── Dockerfile
    ├── integrations
    │   ├── dependency
    │   │   └── whisper
    │   │       ├── check_whisper_server.py
    │   │       ├── Dockerfile
    │   │       ├── Dockerfile.intel_hpu
    │   │       ├── __init__.py
    │   │       ├── whisper_model.py
    │   │       └── whisper_server.py
    │   ├── opea_whisper_asr.py
    ├── opea_asr_microservice.py
    ├── README.md
    └── requirements.txt

Issues

#988
#1007

Type of change

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)
  • Others (enhancement, documentation, validation, etc.)

Dependencies

None

Tests

WIP

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
comps/cores/common/component.py 88.09% <100.00%> (ø)

@Spycsh Spycsh force-pushed the refactor_multimedia branch from 6d40945 to ccb8aae Compare December 17, 2024 09:12
Copy link
Collaborator

@letonghan letonghan left a comment

Choose a reason for hiding this comment

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

lgtm

@Spycsh Spycsh changed the title Refactor asr comp Refactor asr/tts comp Dec 19, 2024
@Spycsh
Copy link
Member Author

Spycsh commented Dec 20, 2024

I think we can use async discover_and_activate logics to check whether multiple dependencies is on instead of a for loop iteratively checking (with a retries, interval, timeout in the check_health method, it is super time consuming).

@lvliang-intel
Copy link
Collaborator

@Spycsh,
Please update the docker file path in READMEs.

image

@Spycsh
Copy link
Member Author

Spycsh commented Dec 23, 2024

@lvliang-intel @chensuyue , here is the pr opea-project/GenAIExamples#1267 to the links refactor in GenAIExamples for ASR/TTS, please review.

@joshuayao joshuayao linked an issue Dec 24, 2024 that may be closed by this pull request
@Spycsh Spycsh mentioned this pull request Dec 27, 2024
9 tasks
@Spycsh
Copy link
Member Author

Spycsh commented Dec 27, 2024

Close since following work is in #1083.

@Spycsh Spycsh closed this Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants