Skip to content

Commit

Permalink
hour parser minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gullabi committed Feb 23, 2024
1 parent fb53e0e commit ae2bded
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ RUN pip install --upgrade pip && \
make && \
make install

RUN git clone https://github.com/MycroftAI/lingua-franca.git
RUN pip install lingua-franca/
RUN pip install git+https://github.com/MycroftAI/lingua-franca.git@5bfd75fe5996fd364102a0eec3f714c9ddc9275c

WORKDIR /app
COPY ./requirements.txt /app
Expand Down
2 changes: 1 addition & 1 deletion server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ async def details(request: Request):
def worker(sentence, speaker_id, model, use_aliases, new_speaker_ids):
def substitute_time(sentence):
# Regular expression to find time pattern (HH:MM)
time_pattern = re.compile(r'(\d{1,2}):(\d{2})')
time_pattern = re.compile(r'((?<=\s)\d{1,2}):(\d{2}(?=\s))')

# Find all matches of time pattern in the sentence
matches = re.findall(time_pattern, sentence)
Expand Down

0 comments on commit ae2bded

Please sign in to comment.