Files
RustyUI/crates/stable-diffusion-burn/burn-crates/burn-dataset/examples/speech_commands.rs
Ben_Kosytorz 3a67c0979c feat: update workspace paths and enhance gitignore
- Updated stablediffusion crate path from "../stable-diffusion-burn" to "./crates/stable-diffusion-burn" for proper workspace resolution
- Enhanced .gitignore to include generated model files (.mpk, .pt, .bin, .safetensors, .ckpt) and user_data directory
- Added Cargo.lock to gitignore with appropriate comment
- Reorganized IDE files section in gitignore for better clarity
- Added newline at end of file for proper formatting
2026-03-05 19:39:14 +01:00

24 lines
625 B
Rust

#[cfg(feature = "audio")]
use burn_dataset::{Dataset, audio::SpeechCommandsDataset};
#[cfg(feature = "audio")]
fn speech_command() {
let index: usize = 4835;
let test = SpeechCommandsDataset::test();
let item = test.get(index).unwrap();
println!("Item: {:?}", item);
println!("Item Length: {:?}", item.audio_samples.len());
println!("Label: {}", item.label);
assert_eq!(test.len(), 4890);
assert_eq!(item.label.to_string(), "Yes");
assert_eq!(item.sample_rate, 16000);
assert_eq!(item.audio_samples.len(), 16000);
}
fn main() {
#[cfg(feature = "audio")]
speech_command()
}