Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
Signed-off-by: NickLucche <[email protected]>
  • Loading branch information
NickLucche committed Feb 14, 2025
1 parent c85c8b2 commit bbbb8cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vllm/entrypoints/whisper_server/api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def _generate(prompt, raw_request: Request) -> Response:
engine = raw_request.app.state.engine
results_generator = engine.generate(prompt, sampling_params, request_id)

async def stream_results() -> AsyncGenerator[bytes, None]:
async def stream_results() -> AsyncGenerator[str, None]:
async for request_output in results_generator:
assert len(request_output.outputs) == 1
chunk = TranscriptionResponse(text=request_output.outputs[0].text)
Expand Down
2 changes: 1 addition & 1 deletion vllm/entrypoints/whisper_server/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def exact_div(x, y):
N_SAMPLES_PER_TOKEN) # 20ms per audio token


def load_audio_from_bytes(audio_bytes: str, sample_rate: int = SAMPLE_RATE):
def load_audio_from_bytes(audio_bytes: bytes, sample_rate: int = SAMPLE_RATE):
"""
Read bytes from audio file as mono waveform, resampling as necessary
Expand Down

0 comments on commit bbbb8cc

Please sign in to comment.