Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankush Rana committed Apr 9, 2024
1 parent 350161c commit 4ccfcaa
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ COPY ./requirements.txt /app
RUN python -m pip install --upgrade pip
RUN python -m pip install --no-cache-dir -r requirements.txt

ENTRYPOINT python main.py --speech_speed ${SPEECH_SPEED} --mp_workers ${MP_WORKERS} --use_cuda ${USE_CUDA} --use_mp ${USE_MP} --show_details True
ENTRYPOINT python main.py --speech_speed ${SPEECH_SPEED} --mp_workers ${MP_WORKERS} --use_cuda ${USE_CUDA} --use_mp ${USE_MP} --show_details True --reload
2 changes: 1 addition & 1 deletion Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ WORKDIR /app
COPY ./requirements.txt /app
RUN python -m pip install --upgrade pip
RUN python -m pip install --no-cache-dir -r requirements.txt
RUN pip install pytest httpx pydub
RUN pip install pytest httpx pydub pytest-repeat

ENTRYPOINT pytest
2 changes: 1 addition & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
environment:
- SPEECH_SPEED=${SPEECH_SPEED-1.0}
- MP_WORKERS=${MP_WORKERS-4}
- USE_MP=${USE_MP-True}
- USE_MP=False
restart: always
volumes:
- .:/app
Expand Down
1 change: 0 additions & 1 deletion server/tests/api/views/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def test_multi_larger_text(self):
"type": "text",
"text": ""
}

for sentence in texts:
options["text"] = sentence

Expand Down
2 changes: 1 addition & 1 deletion server/views/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def tts(request: TTSRequestModel):

pool = mp.Pool(processes=mp_workers)

results = pool.map_async(worker_with_args, [sentence.strip() for sentence in sentences if sentence])
results = pool.map(worker_with_args, [sentence.strip() for sentence in sentences if sentence])

# Close the pool to indicate that no more tasks will be submitted
pool.close()
Expand Down

0 comments on commit 4ccfcaa

Please sign in to comment.