Leaked semaphore warning on shutdown when using WhisperModel
Hi,
I'm using `faster-whisper` inside a container and noticing a warning on shutdown after running a transcription:
```
/usr/local/lib/python3.14/multiprocessing/resource_tracker.py:475: UserWarning:
resource_tracker: There appear to be X leaked semaphore objects to clean up at shutdown
```
### Minimal setup
* Python: 3.14
* `faster-whisper:1.2.1`
* Running inside a container
* Simple usage:
```python
from faster_whisper import WhisperModel
model = WhisperModel("Systran/faster-whisper-base", device="auto", compute_type="auto")
segments, info = model.transcribe(audio_bytes)
```
## What I observed
* The transcription works fine
* The warning appears **only at process/container shutdown**
* I tried explicitly cleaning up:
* deleting the model (`del model`)
* clearing internal references (`model.model = None`)
* calling `gc.collect()`
…but the warning still appears.
## Questions
1. Is this a known/common issue when using `faster-whisper` (or `ctranslate2`)?
2. Are there recommended ways to properly release resources or avoid this warning?
3. Is this something that needs to be handled at the library level, or is it expected/harmless?
0 条评论