Skip to content

Commit

Permalink
pushing to Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
solarslurpi committed Aug 12, 2024
1 parent 33ba696 commit 743149b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.vscode
local/
state_cache/
# Created by https://www.toptal.com/developers/gitignore/api/python
# Edit at https://www.toptal.com/developers/gitignore?templates=python

Expand Down
1 change: 0 additions & 1 deletion docs/README_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# Running the Container on WSL2

`docker run --name transcriber --gpus all -d -p 8081:8081 --restart always solarslurpie/transcriber_wsl:latest`

`--name`: name of the container. Assigning a name is optional but makes it easier to interact with the container. For example:
```
docker stop <name>
Expand Down
1 change: 1 addition & 0 deletions src/logging_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def filter(self, record):
logging.getLogger('sse_starlette.sse').setLevel(logging.WARNING)
logging.getLogger('watchfiles.main').setLevel(logging.WARNING)
logging.getLogger('multipart.multipart').setLevel(logging.WARNING)
logging.getLogger('filelock').setLevel(logging.WARNING)
logging.getLogger('transcription_state_code').setLevel(logging.INFO)
logging.getLogger('metadata_extractor_code').setLevel(logging.INFO)
logging.getLogger('utils').setLevel(logging.INFO)
Expand Down
8 changes: 4 additions & 4 deletions src/transcription_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ async def transcribe(self, audio: str, state_chapters: list[Chapter] = None) ->

# Returns a generator
segments, info = self.model.transcribe(audio, beam_size=5)
total_duration = format(info.duration_after_vad, '.0f')
await send_sse_message("status", f"Content length: {total_duration} seconds.")
logger.debug(f"total_duration: {total_duration} seconds")
total_duration = info.duration_after_vad
await send_sse_message("status", f"Content length: {total_duration:.1f} seconds.")
logger.debug(f"total_duration: {total_duration:.1f} seconds")
chapters = await self.break_audio_into_chapters(segments, total_duration, state_chapters)
logger.info(f"<---Done transcribing {audio}. Duration: {total_duration} seconds. {len(chapters)} chapters.")
logger.info(f"<---Done transcribing {audio}. Duration: {total_duration:.1f} seconds. {len(chapters)} chapters.")
return chapters

async def break_audio_into_chapters(self, segments, total_duration, state_chapters):
Expand Down

0 comments on commit 743149b

Please sign in to comment.