Commit Graph

46 Commits

Author SHA1 Message Date
Quentin Fuxa
e61d1d111f script to lib 2025-03-19 15:10:05 +01:00
Quentin Fuxa
5624c1f6b7 Refactor import statement for AudioProcessor and update cleanup method to be awaited; remove unused formatters and state management files 2025-03-19 11:18:12 +01:00
Quentin Fuxa
7679370cf6 Refactor AudioProcessor methods for improved async handling and WebSocket integration 2025-03-19 10:59:50 +01:00
Quentin Fuxa
5ca65e21b7 Refactor DiartDiarization initialization and streamline WebSocket audio processing 2025-03-19 10:33:22 +01:00
Quentin Fuxa
dc02bcdbdd refacto 0 2025-03-18 18:31:23 +01:00
Quentin Fuxa
4f87ac3ea4 Refactor PCM conversion to a dedicated function; immediate chunk addition to the diarization queue 2025-03-17 11:46:45 +01:00
Quentin Fuxa
b768b219fe Warmup functionality: add timeout option (for VM not connected to internet); False option to disable warmup 2025-03-14 11:41:18 +01:00
Silas Kieser
cb5cf39336 fix #84 2025-03-13 15:03:16 +01:00
Quentin Fuxa
3024a9bdb2 Diarization : Uses a rx observer instead of diart attach_hooks method 2025-03-13 12:02:18 +01:00
Quentin Fuxa
e3550ef07d use confidence scores returned by whisper to immediately validate tokens 2025-03-03 12:08:56 +01:00
Quentin Fuxa
b37d3cafb3 ffmpeg timout from 5 to 15s; diarization lag does not stay = 0 at the beginning 2025-03-03 10:34:32 +01:00
Quentin Fuxa
2a869cd509 solve https://github.com/QuentinFuxa/whisper_streaming_web/issues/60#issuecomment-2692191781 2025-03-01 15:53:35 +01:00
Quentin Fuxa
2d2a4967e6 update import paths 2025-02-28 18:41:12 +01:00
Quentin Fuxa
14af47e84b undiarized text is assigned to last speaker, with buffer information; traceback is used to format_exc errors 2025-02-28 18:11:36 +01:00
Quentin Fuxa
7b1c88589e // execution for diarization and transcription 2025-02-28 15:43:46 +01:00
Quentin Fuxa
091d5d7bf5 new buffer format 2025-02-26 21:27:39 +01:00
Quentin Fuxa
2ced4fef20 diarization now works at word - not chunk - level! 2025-02-24 00:35:42 +01:00
Quentin Fuxa
296327071d Enhance diarization logic to improve speaker attribution : corrects several bugs 2025-02-23 23:14:10 +01:00
Quentin Fuxa
fa39eda923 DiartDiarization loaded in asynccontextmanager lifespan 2025-02-19 16:47:34 +01:00
Quentin Fuxa
2608abf0f3 Improve speaker handling; update sleep duration and manage speaker transitions more effectively 2025-02-19 14:41:37 +01:00
Quentin Fuxa
6121083549 add parameter to disable transcription (only diarization), add time in output 2025-02-19 11:21:40 +01:00
Quentin Fuxa
525abcbca7 Implement logging for WebSocket events and FFmpeg process management; remove obsolete test file 2025-02-15 15:21:33 +01:00
Quentin Fuxa
84b09bb2cc handle ffmpeg timeouts > 5s 2025-02-14 17:22:03 +00:00
Quentin Fuxa
15089c80fd Add get_buffer method to retrieve unvalidated buffer in string format 2025-02-12 23:36:52 +00:00
Quentin Fuxa
788fe1c676 optimize ffmpeg buffer reading :round duration to nearest lower 0.1s 2025-02-12 23:28:58 +00:00
Quentin Fuxa
149d2ee44c Use lifespan to load the model just one 2025-02-12 05:53:55 +01:00
Quentin Fuxa
adaca751ce remove logs handler 2025-02-12 05:46:56 +01:00
Quentin Fuxa
1f6119e405 all text-related classes now share a common TimedText base class 2025-02-07 23:12:04 +01:00
Quentin Fuxa
f7f1f259c1 buffer is now transcript.text 2025-02-07 12:25:05 +01:00
Silas Kieser
f4d3df3d87 change log format 2025-01-28 21:25:17 +01:00
Silas Kieser
9c7d429e15 add logging config to server 2025-01-28 17:38:13 +01:00
Quentin Fuxa
4622fe7aff Merge branch 'main' into fix-sentencesegmenter 2025-01-28 15:53:10 +01:00
Silas Kieser
8ee1488c08 rename to_flush to concatenate_tsw 2025-01-27 16:49:22 +01:00
Quentin Fuxa
fba37eba0a move to src 2025-01-19 21:17:55 +01:00
Quentin Fuxa
5523b51fd7 first speaker is "0" no more None 2025-01-19 19:40:09 +01:00
Quentin Fuxa
977436622a add diarization (beta). Disabled by default 2025-01-19 17:12:40 +01:00
Quentin Fuxa
ce56264241 split whisper_online.py into smaller files 2025-01-14 20:52:53 +01:00
Quentin Fuxa
9cbac96c44 del online once webstreaming is finished 2025-01-14 20:20:22 +01:00
Ava
f52a5ae3c2 specify encoding to ensure Python reads file as UTF-8
executing `python whisper_fastapi_online_server.py --host 0.0.0.0 --port 8000` resulted in error on my setup for me:

```
whisper_streaming_web\whisper_fastapi_online_server.py, line 47, in <module>
    html = f.read()
           ^^^^^^^^
  File "C:\Python312\Lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 1818: character maps to <undefined>
```

On Windows, Python defaults to the `cp1252` encoding, which may not match the encoding of the file being read. 
Files containing special characters, non-ASCII text, or saved with UTF-8 encoding can trigger this error when read without specifying the correct encoding.
2025-01-13 23:12:38 +11:00
Quentin Fuxa
aa0ba598f0 no online conflict when multiple users 2025-01-03 14:48:45 +01:00
silask
5fdb08edae black formating 2024-12-30 21:53:33 +01:00
Quentin Fuxa
122368bff3 Append full transcription in websocket processing 2024-12-30 15:21:00 +01:00
Quentin Fuxa
c960d1571d Batch unprocessed audio to reduce Whisper streaming calls 2024-12-28 18:32:27 +01:00
Quentin Fuxa
1cea20a42d /ws to /asr to distinguish protocol ws:// from endpoint 2024-12-24 19:36:20 +01:00
Quentin Fuxa
bee27c68e6 better buffer gestion 2024-12-19 10:19:24 +01:00
Quentin Fuxa
104f7bde03 add fastapi server with live webm to pcm conversion and web page showing both complete transcription and partial transcription 2024-12-16 13:24:27 +01:00