Repository: huggingface/candle (language: rust)

Issue:
Whisper example does not run
```
USER@HOST:~/workspace/candle/candle-examples/examples/whisper$ cargo run --example whisper --release
error: target `whisper` in package `candle-examples` requires the features: `symphonia`
Consider enabling them by passing, e.g., `--features="symphonia"`
USER@HOST:~/workspace/candle/candle-examples/examples/whisper$ cargo run --example whisper --features=symphonia --release
    Finished release [optimized] target(s) in 0.13s
     Running `/home/USER/.cache/cargo-target/release/examples/whisper`
Running on CPU, to run on GPU, build this example with `--features cuda`
No audio file submitted: Downloading https://huggingface.co/datasets/Narsil/candle_demo/blob/main/samples_jfk.wav
Error: I/O error File exists (os error 17)

Caused by:
    File exists (os error 17)
USER@HOST:~/workspace/candle/candle-examples/examples/whisper$ RUST_BACKTRACE=1 cargo run --example whisper --features=symphonia
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `/home/USER/.cache/cargo-target/debug/examples/whisper`
Running on CPU, to run on GPU, build this example with `--features cuda`
No audio file submitted: Downloading https://huggingface.co/datasets/Narsil/candle_demo/blob/main/samples_jfk.wav
Error: I/O error File exists (os error 17)

Caused by:
    File exists (os error 17)

Stack backtrace:
   0: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/result.rs:1959:27
   1: whisper::main
             at ./main.rs:512:13
   2: core::ops::function::FnOnce::call_once
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/ops/function.rs:250:5
   3: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/sys_common/backtrace.rs:155:18
   4: std::rt::lang_start::{{closure}}
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/rt.rs:166:18
   5: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/panicking.rs:554:40
      std::panicking::try
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/panicking.rs:518:19
      std::panic::catch_unwind
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/rt.rs:148:48
      std::panicking::try::do_call
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/panicking.rs:554:40
      std::panicking::try
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/panicking.rs:518:19
      std::panic::catch_unwind
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/rt.rs:148:20
   6: std::rt::lang_start
             at /rustc/aedd173a2c086e558c2b66d3743b344f977621a7/library/std/src/rt.rs:165:17
   7: main
   8: __libc_start_call_main
             at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
   9: __libc_start_main_impl
             at ./csu/../csu/libc-start.c:360:3
  10: _start
```

The offending code in main:512 is `dataset.get("samples_jfk.wav")?`. So, this file already exists? I don't know where it is trying to be downloaded to, but I cannot find it anywhere on my home drive, so I don't think that is accurate.


Discussion / hints:
It's likely trying to put it somewhere in `.cache/huggingface/hub`, maybe there is indeed already a file there but with a different owner or permissions that don't allow for overwriting the file? (looks more like an issue with hf_hub https://github.com/huggingface/hf-hub than with candle itself if that's not the case)
I discovered the issue was a broken link at `~/.cache/huggingface`. I don't know why the error message was "File exists", that was confusing. Not sure if the error message can be improved since it looks like an error from the OS. The missing feature from the first error message could be included in the Readme though.



Fix patch:
diff --git a/candle-examples/examples/whisper/README.md b/candle-examples/examples/whisper/README.md
index a7dd408164..eb77a65b9a 100644
--- a/candle-examples/examples/whisper/README.md
+++ b/candle-examples/examples/whisper/README.md
@@ -12,7 +12,7 @@ file](https://huggingface.co/datasets/Narsil/candle-examples/resolve/main/sample
 from the hub.
 
 ```bash
- cargo run --example whisper --release
+ cargo run --example whisper --release --features="symphonia"
 
 > No audio file submitted: Downloading https://huggingface.co/datasets/Narsil/candle_demo/blob/main/samples_jfk.wav
 > loaded wav data: Header { audio_format: 1, channel_count: 1, sampling_rate: 16000, bytes_per_second: 32000, bytes_per_sample: 2, bits_per_sample: 16 }


Test patch: