|
| 1 | +# Troubleshooting |
| 2 | + |
| 3 | +This short FAQ covers the install and deployment failures that most often block a first FunASR trial. For model choice, see the [model selection guide](./model_selection.md); for serving options, see the [deployment matrix](./deployment_matrix.md). |
| 4 | + |
| 5 | +## Install or import fails |
| 6 | + |
| 7 | +- Install `torch` and `torchaudio` first, then install FunASR: |
| 8 | + |
| 9 | +```bash |
| 10 | +python -m pip install -U torch torchaudio |
| 11 | +python -m pip install -U "funasr==1.3.26" |
| 12 | +``` |
| 13 | + |
| 14 | +- Keep `torch`, `torchaudio`, and `torchvision` on compatible versions from the same install channel. If you use vLLM, follow [the vLLM guide](./vllm_guide.md) and avoid mixing unrelated CUDA wheels in the same environment. |
| 15 | +- If import still fails, create a fresh virtual environment and include the complete Python version, operating system, CUDA driver, `pip list | grep -E "torch|torchaudio|funasr"`, and the exact traceback in a **Deployment Help** issue. |
| 16 | + |
| 17 | +## Model download is slow or fails |
| 18 | + |
| 19 | +- In mainland China, try ModelScope first. Use the `iic/...` model names shown in the README and model zoo, or pass the ModelScope hub option when a command exposes it. |
| 20 | +- Outside mainland China, Hugging Face mirrors are often faster. For GGUF or edge runtime models, use the public FunAudioLLM repositories on Hugging Face. |
| 21 | +- If a download is interrupted, clear only the partial cache for that model and retry. Include the hub, model id, network environment, and error log in a **Deployment Help** issue. |
| 22 | + |
| 23 | +## `funasr-server` starts but OpenAI-compatible requests fail |
| 24 | + |
| 25 | +- Confirm the server extras are installed, including FastAPI, Uvicorn, and multipart upload support. |
| 26 | +- Smoke test the health of the OpenAI-compatible transcription route with a small local WAV file before wiring it into an agent or SDK: |
| 27 | + |
| 28 | +```bash |
| 29 | +curl -X POST "http://127.0.0.1:8000/v1/audio/transcriptions" \ |
| 30 | + -F "file=@example.wav" \ |
| 31 | + -F "model=FunAudioLLM/SenseVoiceSmall" |
| 32 | +``` |
| 33 | + |
| 34 | +- If `/v1/audio/transcriptions` returns 4xx or 5xx, attach the startup command, full server log, request command, model id, hub, and audio duration. |
| 35 | + |
| 36 | +## WebSocket realtime output is empty or delayed |
| 37 | + |
| 38 | +- Check that the client sends the audio format expected by the WebSocket demo, especially sample rate, channel count, chunk size, and PCM encoding. |
| 39 | +- Use a short known-good WAV first. Long silence, unsupported codecs, or mismatched sample rates can look like a serving failure. |
| 40 | +- When filing **Deployment Help**, include the WebSocket URL, client command or browser console output, model id, sample rate, and the server-side session statistics. |
| 41 | + |
| 42 | +## llama.cpp or GGUF runtime does not start |
| 43 | + |
| 44 | +- Download the current `runtime-llamacpp-v0.1.8` release package from the README or [funasr.com/llama-cpp](https://www.funasr.com/llama-cpp.html). |
| 45 | +- Match the package to the machine: CPU builds work broadly, Vulkan builds need a working Vulkan runtime, and CUDA builds need compatible NVIDIA drivers. |
| 46 | +- Use the current GGUF model repositories on Hugging Face, such as `FunAudioLLM/Fun-ASR-Nano-GGUF` or `FunAudioLLM/SenseVoiceSmall-GGUF`. |
| 47 | +- For GPU issues, include `nvidia-smi`, operating system, driver version, runtime package name, model file name, and the complete llama.cpp command in a **Deployment Help** issue. |
| 48 | + |
| 49 | +## What to include in a Deployment Help issue |
| 50 | + |
| 51 | +Please include: |
| 52 | + |
| 53 | +- operating system, Python version, install command, and virtual environment tool; |
| 54 | +- `torch`, `torchaudio`, CUDA, driver, and GPU details; |
| 55 | +- FunASR version, model id, hub (`ModelScope` or `Hugging Face`), and deployment mode; |
| 56 | +- exact command, minimal audio sample details, full error log, and whether the same sample works in the local Python pipeline. |
0 commit comments