-
Notifications
You must be signed in to change notification settings - Fork 0
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
387 deploy whisper #388
387 deploy whisper #388
Changes from 23 commits
a539494
d4a47ec
5358360
23c579a
f9d5b9d
142111c
3bc3398
9e34833
6884eab
4301952
0a46c88
a5af166
15c8182
edd5157
57aeccd
6620f9c
7895f4d
81763d7
2b2af94
7444699
1fb986b
d84fc9e
7330454
7ccda4c
2525f08
0adc439
d9c2a9f
f6f707e
0a53514
9a92766
95624bb
17c68ac
1dacb4d
5728e9c
4bd9c00
48fb3f9
07ee0f6
2f4cabf
9740468
496c079
034351a
3384b42
234fad6
45b70dd
7e0a4dd
5dd6866
1a901b0
6af5a48
d84ae55
25f5068
5be8e9c
90684a6
4e91e9f
c82a185
0dbb056
fbec381
a67df4f
cf032d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ venv | |
.idea | ||
ssl | ||
__pycache__ | ||
/VERSION.json | ||
/VERSION.json | ||
.env | ||
/whisper_asr_model_cache |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,20 +12,14 @@ services: | |
- training_processor | ||
volumes: | ||
- ../database-dump:/app/dump/database-dump/ | ||
|
||
vosk: | ||
image: "osll/vosk:v0.1" | ||
restart: always | ||
ports: | ||
- 2700:2700 | ||
|
||
audio_processor: | ||
image: base_image | ||
command: python3 -m audio_processor $APP_CONF | ||
restart: always | ||
depends_on: | ||
- db | ||
- vosk | ||
- whisper | ||
- presentation_processor | ||
|
||
recognized_audio_processor: | ||
|
@@ -76,3 +70,14 @@ services: | |
- '--wiredTigerCacheSizeGB=2' | ||
volumes: | ||
- ../mongo_data:/data/db | ||
|
||
whisper: | ||
HadronCollider marked this conversation as resolved.
Show resolved
Hide resolved
|
||
image: "onerahmet/openai-whisper-asr-webservice:v1.3.0" | ||
environment: | ||
- ASR_MODEL=${WHISPER_ASR_MODEL:-tiny} | ||
- ASR_ENGINE=${WHISPER_ASR_ENGINE:-openai_whisper} | ||
restart: always | ||
cpuset: ${WHISPER_CPU:-0,1} | ||
mem_limit: 5g | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Вынесите параметр по аналогии в env |
||
volumes: | ||
- ./whisper_asr_model_cache:/root/.cache/whisper | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Чтобы не засорять хост/папку репо (и не трогать docker/gitignore) - сделайте docker volume ( https://docs.docker.com/compose/compose-file/07-volumes/ ) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
import pytest | ||
|
||
from app.criteria import StrictSpeechDurationCriterion, SpeechPaceCriterion, FillersNumberCriterion | ||
from app.feedback_evaluator import PredefenceEightToTenMinutesFeedbackEvaluator | ||
from app.feedback_evaluator import PredefenceEightToTenMinutesNoSlideCheckFeedbackEvaluator | ||
|
||
|
||
class TestPredefenceEightToTenMinutesFeedbackEvaluator: | ||
class TestPredefenceEightToTenMinutesNoSlideCheckFeedbackEvaluator: | ||
@pytest.mark.parametrize( | ||
"criteria_results, expected_string", | ||
[ | ||
({}, ''), | ||
({StrictSpeechDurationCriterion.__name__: {'result': 0}}, None), | ||
({StrictSpeechDurationCriterion.__name__: {'result': 0.5}}, '0.600 * 0.50'), | ||
({}, None), | ||
({"PredefenceStrictSpeechDurationCriterion": {'result': 0}}, None), | ||
({"PredefenceStrictSpeechDurationCriterion": {'result': 0.5}}, None), | ||
({"DEFAULT_SPEECH_PACE_CRITERION": {'result': 0.5}}, None), | ||
({ | ||
StrictSpeechDurationCriterion.__name__: {'result': 0.5}, | ||
SpeechPaceCriterion.__name__: {'result': 0.7}, | ||
FillersNumberCriterion.__name__: {'result': 0.9}, | ||
"PredefenceStrictSpeechDurationCriterion": {'result': 0.5}, | ||
"DEFAULT_FILLERS_NUMBER_CRITERION": {'result': 0.9}, | ||
}, None), | ||
({ | ||
"PredefenceStrictSpeechDurationCriterion": {'result': 0.5}, | ||
"DEFAULT_SPEECH_PACE_CRITERION": {'result': 0.7}, | ||
"DEFAULT_FILLERS_NUMBER_CRITERION": {'result': 0.9}, | ||
}, '0.600 * 0.50 + 0.200 * 0.70 + 0.200 * 0.90'), | ||
({ | ||
StrictSpeechDurationCriterion.__name__: {'result': 0.5}, | ||
FillersNumberCriterion.__name__: {'result': 0.9}, | ||
}, '0.600 * 0.50 + 0.200 * 0.90'), | ||
], | ||
) | ||
def test_get_result_as_sum_str(self, criteria_results, expected_string): | ||
feedback_evaluator = PredefenceEightToTenMinutesFeedbackEvaluator() | ||
feedback_evaluator = PredefenceEightToTenMinutesNoSlideCheckFeedbackEvaluator() | ||
assert feedback_evaluator.get_result_as_sum_str(criteria_results) == expected_string | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Добавьте в сообщение длительность аудио (вы её получаете выше) - так будут более полезные логи (длина записи + время её обработки)