help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
speech-recognition
/
css
RSK World
speech-recognition
Speech Recognition Dataset - Audio AI + Speech-to-Text + Voice Recognition
css
  • style.css44 KB
example_usage.pycreate_sample_data.pytransformer_model.pypreprocess.cpython-313.pycload_dataset.pymetadata.csvstyle.css
scripts/transformer_model.py
Raw Download
Find: Go to:
"""
============================================================================
Speech Recognition Dataset - Transformer Model
============================================================================

Project: Speech Recognition Dataset
Description: Audio speech recognition dataset with labeled speech samples 
             for training speech-to-text and voice recognition models.

============================================================================
DEVELOPER INFORMATION
============================================================================
Website: https://rskworld.in
Founded by: Molla Samser
Designer & Tester: Rima Khatun
Email: help@rskworld.in
Support: support@rskworld.in
Phone: +91 93305 39277
Address: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147

============================================================================
COPYRIGHT NOTICE
============================================================================
© 2026 RSK World. All rights reserved.
This dataset is provided for educational and research purposes.

============================================================================

This script implements a Transformer-based model for speech recognition,
supporting both TensorFlow and PyTorch implementations.
"""

import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
import pandas as pd
from pathlib import Path
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
import pickle


class PositionalEncoding(layers.Layer):
    """
    Positional encoding layer for Transformer.
    Adds positional information to the input embeddings.
    """
    
    def __init__(self, max_len=5000, d_model=256):
        super().__init__()
        self.max_len = max_len
        self.d_model = d_model
        
        # Create positional encoding matrix
        position = np.arange(max_len)[:, np.newaxis]
        div_term = np.exp(np.arange(0, d_model, 2) * -(np.log(10000.0) / d_model))
        
        pe = np.zeros((max_len, d_model))
        pe[:, 0::2] = np.sin(position * div_term)
        pe[:, 1::2] = np.cos(position * div_term)
        
        self.pe = tf.constant(pe[np.newaxis, :, :], dtype=tf.float32)
    
    def call(self, x):
        seq_len = tf.shape(x)[1]
        return x + self.pe[:, :seq_len, :]


class TransformerBlock(layers.Layer):
    """
    Transformer encoder block with multi-head attention.
    """
    
    def __init__(self, d_model, num_heads, ff_dim, dropout_rate=0.1):
        super().__init__()
        self.att = layers.MultiHeadAttention(
            num_heads=num_heads, 
            key_dim=d_model
        )
        self.ffn = keras.Sequential([
            layers.Dense(ff_dim, activation='gelu'),
            layers.Dense(d_model),
        ])
        self.layernorm1 = layers.LayerNormalization(epsilon=1e-6)
        self.layernorm2 = layers.LayerNormalization(epsilon=1e-6)
        self.dropout1 = layers.Dropout(dropout_rate)
        self.dropout2 = layers.Dropout(dropout_rate)
    
    def call(self, inputs, training=False):
        # Multi-head attention
        attn_output = self.att(inputs, inputs)
        attn_output = self.dropout1(attn_output, training=training)
        out1 = self.layernorm1(inputs + attn_output)
        
        # Feed-forward network
        ffn_output = self.ffn(out1)
        ffn_output = self.dropout2(ffn_output, training=training)
        return self.layernorm2(out1 + ffn_output)


class ConformerBlock(layers.Layer):
    """
    Conformer block combining convolution and self-attention.
    More effective for speech recognition tasks.
    """
    
    def __init__(self, d_model, num_heads, conv_kernel_size=31, dropout_rate=0.1):
        super().__init__()
        
        # Feed Forward Module 1
        self.ff1 = keras.Sequential([
            layers.LayerNormalization(epsilon=1e-6),
            layers.Dense(d_model * 4, activation='swish'),
            layers.Dropout(dropout_rate),
            layers.Dense(d_model),
            layers.Dropout(dropout_rate),
        ])
        
        # Multi-Head Self-Attention Module
        self.att = layers.MultiHeadAttention(
            num_heads=num_heads,
            key_dim=d_model // num_heads
        )
        self.att_norm = layers.LayerNormalization(epsilon=1e-6)
        self.att_dropout = layers.Dropout(dropout_rate)
        
        # Convolution Module
        self.conv_norm = layers.LayerNormalization(epsilon=1e-6)
        self.conv = keras.Sequential([
            layers.Conv1D(d_model * 2, 1),  # Pointwise
            layers.Activation('gelu'),
            layers.Conv1D(d_model * 2, conv_kernel_size, padding='same', groups=d_model),  # Depthwise
            layers.BatchNormalization(),
            layers.Activation('swish'),
            layers.Conv1D(d_model, 1),  # Pointwise
            layers.Dropout(dropout_rate),
        ])
        
        # Feed Forward Module 2
        self.ff2 = keras.Sequential([
            layers.LayerNormalization(epsilon=1e-6),
            layers.Dense(d_model * 4, activation='swish'),
            layers.Dropout(dropout_rate),
            layers.Dense(d_model),
            layers.Dropout(dropout_rate),
        ])
        
        self.final_norm = layers.LayerNormalization(epsilon=1e-6)
    
    def call(self, inputs, training=False):
        # Feed Forward 1 (with residual)
        x = inputs + 0.5 * self.ff1(inputs, training=training)
        
        # Self-Attention (with residual)
        attn_out = self.att_norm(x)
        attn_out = self.att(attn_out, attn_out)
        attn_out = self.att_dropout(attn_out, training=training)
        x = x + attn_out
        
        # Convolution (with residual)
        conv_out = self.conv_norm(x)
        conv_out = self.conv(conv_out, training=training)
        x = x + conv_out
        
        # Feed Forward 2 (with residual)
        x = x + 0.5 * self.ff2(x, training=training)
        
        return self.final_norm(x)


class SpeechTransformer:
    """
    Transformer-based speech recognition model.
    """
    
    def __init__(self, 
                 input_dim=13,
                 d_model=256,
                 num_heads=8,
                 num_layers=4,
                 ff_dim=1024,
                 max_len=500,
                 dropout_rate=0.1,
                 use_conformer=False):
        """
        Initialize the Speech Transformer model.
        
        Args:
            input_dim: Input feature dimension (e.g., 13 for MFCC)
            d_model: Model dimension
            num_heads: Number of attention heads
            num_layers: Number of transformer/conformer blocks
            ff_dim: Feed-forward dimension
            max_len: Maximum sequence length
            dropout_rate: Dropout rate
            use_conformer: Use Conformer blocks instead of Transformer
        """
        self.input_dim = input_dim
        self.d_model = d_model
        self.num_heads = num_heads
        self.num_layers = num_layers
        self.ff_dim = ff_dim
        self.max_len = max_len
        self.dropout_rate = dropout_rate
        self.use_conformer = use_conformer
        
        self.model = None
        self.label_encoder = LabelEncoder()
    
    def build_model(self, num_classes):
        """
        Build the Transformer model.
        
        Args:
            num_classes: Number of output classes
            
        Returns:
            Compiled Keras model
        """
        inputs = layers.Input(shape=(None, self.input_dim))
        
        # Project input to model dimension
        x = layers.Dense(self.d_model)(inputs)
        
        # Add positional encoding
        x = PositionalEncoding(self.max_len, self.d_model)(x)
        x = layers.Dropout(self.dropout_rate)(x)
        
        # Transformer/Conformer blocks
        for _ in range(self.num_layers):
            if self.use_conformer:
                x = ConformerBlock(
                    self.d_model,
                    self.num_heads,
                    dropout_rate=self.dropout_rate
                )(x)
            else:
                x = TransformerBlock(
                    self.d_model,
                    self.num_heads,
                    self.ff_dim,
                    self.dropout_rate
                )(x)
        
        # Global average pooling
        x = layers.GlobalAveragePooling1D()(x)
        
        # Classification head
        x = layers.Dense(256, activation='gelu')(x)
        x = layers.Dropout(self.dropout_rate)(x)
        x = layers.Dense(128, activation='gelu')(x)
        x = layers.Dropout(self.dropout_rate)(x)
        outputs = layers.Dense(num_classes, activation='softmax')(x)
        
        model = keras.Model(inputs, outputs)
        
        # Compile with label smoothing
        model.compile(
            optimizer=keras.optimizers.Adam(learning_rate=1e-4),
            loss=keras.losses.CategoricalCrossentropy(label_smoothing=0.1),
            metrics=['accuracy']
        )
        
        return model
    
    def load_features(self, feature_dir, feature_name='mfcc'):
        """
        Load features from the dataset.
        
        Args:
            feature_dir: Directory containing features
            feature_name: Name of feature to load
            
        Returns:
            X, y, metadata
        """
        feature_dir = Path(feature_dir)
        metadata_path = feature_dir / 'features_metadata.csv'
        metadata = pd.read_csv(metadata_path)
        
        X = []
        y = []
        
        print(f"Loading {feature_name} features...")
        for idx, row in metadata.iterrows():
            file_id = row['id']
            feature_path = feature_dir / f"{file_id}_{feature_name}.npy"
            
            if feature_path.exists():
                feature = np.load(feature_path)
                X.append(feature)
                y.append(row['speaker'])
        
        return X, np.array(y), metadata
    
    def pad_sequences(self, sequences, max_length=None):
        """Pad sequences to same length."""
        if max_length is None:
            max_length = min(max(len(seq) for seq in sequences), self.max_len)
        
        padded = []
        for seq in sequences:
            if len(seq) < max_length:
                pad_width = max_length - len(seq)
                padded_seq = np.pad(seq, ((0, pad_width), (0, 0)), mode='constant')
            else:
                padded_seq = seq[:max_length]
            padded.append(padded_seq)
        
        return np.array(padded)
    
    def train(self, X, y, epochs=50, batch_size=32, test_size=0.2, model_dir='models'):
        """
        Train the model.
        
        Args:
            X: Feature arrays
            y: Labels
            epochs: Training epochs
            batch_size: Batch size
            test_size: Test set proportion
            model_dir: Directory to save model
        """
        model_dir = Path(model_dir)
        model_dir.mkdir(parents=True, exist_ok=True)
        
        # Encode labels
        y_encoded = self.label_encoder.fit_transform(y)
        num_classes = len(self.label_encoder.classes_)
        y_categorical = keras.utils.to_categorical(y_encoded, num_classes)
        
        # Pad sequences
        print("Padding sequences...")
        X_padded = self.pad_sequences(X)
        
        # Split data
        X_train, X_test, y_train, y_test = train_test_split(
            X_padded, y_categorical, test_size=test_size, 
            random_state=42, stratify=y_encoded
        )
        
        X_train, X_val, y_train, y_val = train_test_split(
            X_train, y_train, test_size=0.1, random_state=42
        )
        
        # Build model
        print("\nBuilding Transformer model...")
        self.model = self.build_model(num_classes)
        
        print("\nModel Architecture:")
        self.model.summary()
        
        # Callbacks
        callbacks = [
            keras.callbacks.EarlyStopping(
                monitor='val_loss',
                patience=10,
                restore_best_weights=True
            ),
            keras.callbacks.ModelCheckpoint(
                str(model_dir / 'transformer_best.h5'),
                monitor='val_accuracy',
                save_best_only=True
            ),
            keras.callbacks.ReduceLROnPlateau(
                monitor='val_loss',
                factor=0.5,
                patience=5,
                min_lr=1e-7
            ),
            keras.callbacks.TensorBoard(
                log_dir=str(model_dir / 'logs'),
                histogram_freq=1
            )
        ]
        
        # Train
        print("\nTraining model...")
        history = self.model.fit(
            X_train, y_train,
            validation_data=(X_val, y_val),
            epochs=epochs,
            batch_size=batch_size,
            callbacks=callbacks
        )
        
        # Evaluate
        print("\nEvaluating on test set...")
        test_loss, test_accuracy = self.model.evaluate(X_test, y_test, verbose=0)
        print(f"Test Accuracy: {test_accuracy:.4f}")
        print(f"Test Loss: {test_loss:.4f}")
        
        # Save model and encoder
        self.model.save(str(model_dir / 'transformer_final.h5'))
        with open(model_dir / 'transformer_label_encoder.pkl', 'wb') as f:
            pickle.dump(self.label_encoder, f)
        
        print(f"\nModel saved to: {model_dir}")
        return history
    
    def predict(self, features):
        """Make predictions on new features."""
        X = self.pad_sequences([features])
        probs = self.model.predict(X)[0]
        pred_idx = np.argmax(probs)
        pred_class = self.label_encoder.inverse_transform([pred_idx])[0]
        return pred_class, probs


def main():
    """Main function to train the Transformer model."""
    # Initialize model
    transformer = SpeechTransformer(
        input_dim=13,
        d_model=256,
        num_heads=8,
        num_layers=4,
        ff_dim=1024,
        max_len=500,
        dropout_rate=0.1,
        use_conformer=False  # Set True for Conformer
    )
    
    # Load features
    X, y, metadata = transformer.load_features(
        feature_dir='data/features',
        feature_name='mfcc'
    )
    
    print(f"\nDataset Info:")
    print(f"Total samples: {len(X)}")
    print(f"Number of classes: {len(np.unique(y))}")
    print(f"Feature shape (sample): {X[0].shape}")
    
    # Train model
    history = transformer.train(
        X, y,
        epochs=50,
        batch_size=32,
        model_dir='models'
    )
    
    print("\nTransformer training completed!")


if __name__ == '__main__':
    main()

450 lines•14.9 KB
python
scripts/load_dataset.py
Raw Download
Find: Go to:
"""
============================================================================
Speech Recognition Dataset - Dataset Loader
============================================================================

Project: Speech Recognition Dataset
Description: Audio speech recognition dataset with labeled speech samples 
             for training speech-to-text and voice recognition models.

============================================================================
DEVELOPER INFORMATION
============================================================================
Website: https://rskworld.in
Founded by: Molla Samser
Designer & Tester: Rima Khatun
Email: help@rskworld.in
Support: support@rskworld.in
Phone: +91 93305 39277
Address: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147

============================================================================
COPYRIGHT NOTICE
============================================================================
© 2026 RSK World. All rights reserved.
This dataset is provided for educational and research purposes.

============================================================================
"""

import pandas as pd
import numpy as np
import librosa
from pathlib import Path
import json

class SpeechRecognitionDataset:
    """
    Dataset loader for Speech Recognition Dataset
    
    Provides easy access to audio files, metadata, and transcripts
    """
    
    def __init__(self, data_dir='data'):
        """
        Initialize the dataset loader
        
        Args:
            data_dir: Root directory of the dataset
        """
        self.data_dir = Path(data_dir)
        self.audio_dir = self.data_dir / 'audio'
        self.metadata_path = self.data_dir / 'metadata.csv'
        self.transcripts_path = self.data_dir / 'transcripts.json'
        
        # Load metadata
        if self.metadata_path.exists():
            self.metadata = pd.read_csv(self.metadata_path)
        else:
            self.metadata = None
            print(f"Warning: Metadata file not found at {self.metadata_path}")
        
        # Load transcripts
        if self.transcripts_path.exists():
            with open(self.transcripts_path, 'r') as f:
                self.transcripts = json.load(f)
        else:
            self.transcripts = {}
            print(f"Warning: Transcripts file not found at {self.transcripts_path}")
    
    def get_audio_file(self, file_id):
        """
        Get path to audio file by ID
        
        Args:
            file_id: ID of the audio file
            
        Returns:
            Path to audio file
        """
        if self.metadata is None:
            raise ValueError("Metadata not loaded")
        
        row = self.metadata[self.metadata['id'] == file_id]
        if row.empty:
            raise ValueError(f"File ID {file_id} not found in metadata")
        
        file_name = row.iloc[0]['file_name']
        audio_path = self.audio_dir / file_name
        
        if not audio_path.exists():
            raise FileNotFoundError(f"Audio file not found: {audio_path}")
        
        return audio_path
    
    def load_audio(self, file_id, sr=16000):
        """
        Load audio file as numpy array
        
        Args:
            file_id: ID of the audio file
            sr: Sample rate
            
        Returns:
            Audio array and sample rate
        """
        audio_path = self.get_audio_file(file_id)
        y, sr = librosa.load(str(audio_path), sr=sr)
        return y, sr
    
    def get_transcript(self, file_id):
        """
        Get transcript for audio file
        
        Args:
            file_id: ID of the audio file
            
        Returns:
            Transcript text
        """
        if file_id in self.transcripts:
            return self.transcripts[file_id]
        
        # Try to get from metadata
        if self.metadata is not None:
            row = self.metadata[self.metadata['id'] == file_id]
            if not row.empty and 'transcript' in row.columns:
                return row.iloc[0]['transcript']
        
        return None
    
    def get_speaker(self, file_id):
        """
        Get speaker ID for audio file
        
        Args:
            file_id: ID of the audio file
            
        Returns:
            Speaker ID
        """
        if self.metadata is None:
            return None
        
        row = self.metadata[self.metadata['id'] == file_id]
        if not row.empty and 'speaker' in row.columns:
            return row.iloc[0]['speaker']
        
        return None
    
    def get_metadata(self, file_id):
        """
        Get all metadata for audio file
        
        Args:
            file_id: ID of the audio file
            
        Returns:
            Dictionary with metadata
        """
        if self.metadata is None:
            return None
        
        row = self.metadata[self.metadata['id'] == file_id]
        if row.empty:
            return None
        
        return row.iloc[0].to_dict()
    
    def get_files_by_speaker(self, speaker_id):
        """
        Get all file IDs for a specific speaker
        
        Args:
            speaker_id: ID of the speaker
            
        Returns:
            List of file IDs
        """
        if self.metadata is None:
            return []
        
        rows = self.metadata[self.metadata['speaker'] == speaker_id]
        return rows['id'].tolist()
    
    def get_files_by_category(self, category):
        """
        Get all file IDs for a specific category
        
        Args:
            category: Category name (e.g., 'Greeting', 'Command')
            
        Returns:
            List of file IDs
        """
        if self.metadata is None:
            return []
        
        if 'category' not in self.metadata.columns:
            return []
        
        rows = self.metadata[self.metadata['category'] == category]
        return rows['id'].tolist()
    
    def get_statistics(self):
        """
        Get dataset statistics
        
        Returns:
            Dictionary with statistics
        """
        if self.metadata is None:
            return {}
        
        stats = {
            'total_files': len(self.metadata),
            'unique_speakers': self.metadata['speaker'].nunique() if 'speaker' in self.metadata.columns else 0,
            'total_duration': self.metadata['duration'].sum() if 'duration' in self.metadata.columns else 0,
            'average_duration': self.metadata['duration'].mean() if 'duration' in self.metadata.columns else 0,
            'min_duration': self.metadata['duration'].min() if 'duration' in self.metadata.columns else 0,
            'max_duration': self.metadata['duration'].max() if 'duration' in self.metadata.columns else 0,
        }
        
        if 'category' in self.metadata.columns:
            stats['categories'] = self.metadata['category'].value_counts().to_dict()
        
        return stats
    
    def sample(self, n=5, speaker_id=None, category=None):
        """
        Get random sample of files
        
        Args:
            n: Number of samples
            speaker_id: Filter by speaker (optional)
            category: Filter by category (optional)
            
        Returns:
            DataFrame with sample metadata
        """
        if self.metadata is None:
            return None
        
        df = self.metadata.copy()
        
        if speaker_id:
            df = df[df['speaker'] == speaker_id]
        
        if category:
            if 'category' in df.columns:
                df = df[df['category'] == category]
        
        return df.sample(min(n, len(df)))


def main():
    """Example usage of the dataset loader"""
    # Initialize dataset
    dataset = SpeechRecognitionDataset(data_dir='data')
    
    # Get statistics
    stats = dataset.get_statistics()
    print("Dataset Statistics:")
    for key, value in stats.items():
        print(f"  {key}: {value}")
    
    # Get a sample
    print("\nSample files:")
    sample = dataset.sample(n=5)
    if sample is not None:
        print(sample[['id', 'file_name', 'speaker', 'duration', 'transcript']].head())
    
    # Load an audio file
    if sample is not None and len(sample) > 0:
        file_id = sample.iloc[0]['id']
        print(f"\nLoading audio file {file_id}...")
        try:
            audio, sr = dataset.load_audio(file_id)
            transcript = dataset.get_transcript(file_id)
            speaker = dataset.get_speaker(file_id)
            
            print(f"  Audio shape: {audio.shape}")
            print(f"  Sample rate: {sr}")
            print(f"  Duration: {len(audio) / sr:.2f} seconds")
            print(f"  Speaker: {speaker}")
            print(f"  Transcript: {transcript}")
        except Exception as e:
            print(f"  Error loading audio: {str(e)}")


if __name__ == '__main__':
    main()

293 lines•9 KB
python
data/metadata.csv
Raw Download
Find: Go to:
id,file_name,speaker,duration,transcript,category,gender,age_group
1,audio_001.wav,Speaker_001,2.34,"Hello, how are you today?",Greeting,Male,Adult
2,audio_002.wav,Speaker_001,1.87,"Good morning",Greeting,Male,Adult
3,audio_003.wav,Speaker_002,3.12,"Please turn on the lights",Command,Female,Adult
4,audio_004.wav,Speaker_003,4.56,"What's the weather like outside?",Question,Male,Senior
5,audio_005.wav,Speaker_004,2.89,"Set a timer for five minutes",Command,Female,Adult
6,audio_006.wav,Speaker_002,2.15,"Thank you very much",Greeting,Female,Adult
7,audio_007.wav,Speaker_005,3.45,"Can you play some music?",Command,Male,Young
8,audio_008.wav,Speaker_001,2.67,"How much does it cost?",Question,Male,Adult
9,audio_009.wav,Speaker_003,1.98,"Goodbye",Greeting,Male,Senior
10,audio_010.wav,Speaker_004,3.78,"What time is it now?",Question,Female,Adult
11,audio_011.wav,Speaker_006,2.45,"Turn off the television",Command,Male,Adult
12,audio_012.wav,Speaker_007,3.21,"Where is the nearest hospital?",Question,Female,Senior
13,audio_013.wav,Speaker_008,1.56,"Yes please",Greeting,Male,Young
14,audio_014.wav,Speaker_009,2.89,"Call my mother",Command,Female,Adult
15,audio_015.wav,Speaker_010,4.12,"What is the capital of France?",Question,Male,Adult
16,audio_016.wav,Speaker_006,2.34,"Send a message to John",Command,Male,Adult
17,audio_017.wav,Speaker_007,1.78,"No thank you",Greeting,Female,Senior
18,audio_018.wav,Speaker_008,3.45,"Play the next song",Command,Male,Young
19,audio_019.wav,Speaker_009,2.67,"How do I get there?",Question,Female,Adult
20,audio_020.wav,Speaker_010,3.12,"Set an alarm for seven AM",Command,Male,Adult
21,audio_021.wav,Speaker_011,2.89,"Nice to meet you",Greeting,Female,Adult
22,audio_022.wav,Speaker_012,4.23,"What movies are playing tonight?",Question,Male,Young
23,audio_023.wav,Speaker_013,1.98,"Stop the music",Command,Female,Adult
24,audio_024.wav,Speaker_014,3.56,"Can you repeat that please?",Question,Male,Senior
25,audio_025.wav,Speaker_015,2.45,"Open the door",Command,Female,Adult
26,audio_026.wav,Speaker_011,3.78,"What is your name?",Question,Female,Adult
27,audio_027.wav,Speaker_012,2.12,"Volume up",Command,Male,Young
28,audio_028.wav,Speaker_013,2.89,"Have a nice day",Greeting,Female,Adult
29,audio_029.wav,Speaker_014,3.34,"Search for Italian restaurants",Command,Male,Senior
30,audio_030.wav,Speaker_015,2.56,"Read my emails",Command,Female,Adult
31,audio_031.wav,Speaker_016,4.12,"What is the temperature today?",Question,Male,Adult
32,audio_032.wav,Speaker_017,2.23,"Lock the front door",Command,Female,Young
33,audio_033.wav,Speaker_018,1.89,"See you later",Greeting,Male,Adult
34,audio_034.wav,Speaker_019,3.67,"Navigate to the airport",Command,Female,Adult
35,audio_035.wav,Speaker_020,2.45,"Pause the video",Command,Male,Senior
36,audio_036.wav,Speaker_016,3.89,"How far is the beach?",Question,Male,Adult
37,audio_037.wav,Speaker_017,2.78,"Dim the lights to fifty percent",Command,Female,Young
38,audio_038.wav,Speaker_018,2.34,"Good evening",Greeting,Male,Adult
39,audio_039.wav,Speaker_019,4.45,"Find me a recipe for pasta",Command,Female,Adult
40,audio_040.wav,Speaker_020,2.12,"Skip this track",Command,Male,Senior
41,audio_041.wav,Speaker_021,3.23,"What are my appointments today?",Question,Female,Adult
42,audio_042.wav,Speaker_022,2.56,"Close the window",Command,Male,Adult
43,audio_043.wav,Speaker_023,1.78,"Thanks a lot",Greeting,Female,Young
44,audio_044.wav,Speaker_024,3.89,"How do you spell that?",Question,Male,Adult
45,audio_045.wav,Speaker_025,2.45,"Increase the brightness",Command,Female,Adult
46,audio_046.wav,Speaker_021,4.12,"What is the stock price of Apple?",Question,Female,Adult
47,audio_047.wav,Speaker_022,2.89,"Add milk to my shopping list",Command,Male,Adult
48,audio_048.wav,Speaker_023,2.34,"Good night",Greeting,Female,Young
49,audio_049.wav,Speaker_024,3.56,"Show me photos from last week",Command,Male,Adult
50,audio_050.wav,Speaker_025,2.78,"Translate hello to Spanish",Command,Female,Adult
52 lines•3.9 KB
csv
css/style.css
Raw Download
Find: Go to:
/**
 * ============================================================================
 * Speech Recognition Dataset - Stylesheet
 * ============================================================================
 * 
 * Project: Speech Recognition Dataset
 * Description: Audio speech recognition dataset with labeled speech samples 
 *              for training speech-to-text and voice recognition models.
 * 
 * ============================================================================
 * DEVELOPER INFORMATION
 * ============================================================================
 * Website: https://rskworld.in
 * Founded by: Molla Samser
 * Designer & Tester: Rima Khatun
 * Email: help@rskworld.in
 * Support: support@rskworld.in
 * Phone: +91 93305 39277
 * Address: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
 * 
 * ============================================================================
 * COPYRIGHT NOTICE
 * ============================================================================
 * © 2026 RSK World. All rights reserved.
 * This dataset is provided for educational and research purposes.
 * 
 * ============================================================================
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-4: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-5: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-6: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
}

/* Light Theme Variables */
[data-theme="light"] {
    --dark-bg: #f8fafc;
    --dark-surface: #ffffff;
    --dark-border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.sound-bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 50px;
    gap: 4px;
    margin-bottom: 1rem;
}

.sound-bars span {
    width: 6px;
    background: var(--gradient-1);
    border-radius: 3px;
    animation: soundBar 1s ease-in-out infinite;
}

.sound-bars span:nth-child(1) { animation-delay: 0s; height: 20px; }
.sound-bars span:nth-child(2) { animation-delay: 0.1s; height: 35px; }
.sound-bars span:nth-child(3) { animation-delay: 0.2s; height: 25px; }
.sound-bars span:nth-child(4) { animation-delay: 0.3s; height: 40px; }
.sound-bars span:nth-child(5) { animation-delay: 0.4s; height: 30px; }

@keyframes soundBar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

.loader p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Custom Cursor */
.cursor, .cursor-follower {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
}

.cursor {
    width: 10px;
    height: 10px;
    background: white;
    transition: transform 0.1s;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s, width 0.3s, height 0.3s;
}

.cursor-follower.hover {
    width: 60px;
    height: 60px;
    border-color: var(--primary-color);
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.sound-wave {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: wave 20s infinite;
}

.wave-1 {
    top: -50%;
    left: -50%;
    animation-delay: 0s;
}

.wave-2 {
    top: -30%;
    left: -30%;
    animation-delay: 7s;
}

.wave-3 {
    top: -70%;
    left: -70%;
    animation-delay: 14s;
}

@keyframes wave {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.1;
    }
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dark-border);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-brand:hover {
    color: var(--primary-color);
}

.nav-brand i {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.download-btn {
    background: var(--gradient-1);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    color: white !important;
}

.download-btn::after {
    display: none;
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.theme-toggle, .search-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.theme-toggle:hover, .search-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.search-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.search-container {
    width: 100%;
    max-width: 600px;
    background: var(--dark-surface);
    border-radius: 16px;
    border: 1px solid var(--dark-border);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.search-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--dark-border);
    gap: 1rem;
}

.search-header i {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.search-header input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
}

.search-header input::placeholder {
    color: var(--text-muted);
}

.close-search {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s;
}

.close-search:hover {
    color: var(--accent-color);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.search-hint {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.search-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--dark-bg);
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 0.25rem;
    cursor: pointer;
    transition: all 0.3s;
}

.search-tag:hover {
    background: var(--primary-color);
    color: white;
}

.search-result-item {
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-result-item:hover {
    background: var(--dark-bg);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--dark-surface);
    border-bottom: 1px solid var(--dark-border);
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.mobile-link:hover {
    background: var(--dark-border);
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 60px;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Typing Animation */
.typing-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.typing-label {
    color: var(--text-muted);
}

.typing-text {
    color: var(--primary-color);
    font-weight: 600;
}

.typing-cursor {
    color: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: var(--dark-surface);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
}

.btn-secondary:hover {
    background: var(--dark-border);
    transform: translateY(-2px);
}

.hero-visual {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.waveform-container {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--dark-border);
}

.waveform-container canvas {
    width: 100%;
    height: 200px;
}

.audio-player-card {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--dark-border);
}

.player-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.player-waveform {
    height: 80px;
    background: var(--dark-bg);
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.play-btn:hover {
    transform: scale(1.1);
}

.progress-container {
    flex: 1;
    height: 6px;
    background: var(--dark-bg);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s;
}

.time-display {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.volume-control i {
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.volume-control i:hover {
    color: var(--primary);
}

.volume-slider {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--glass-bg);
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--primary);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.speaker-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary-color);
    width: fit-content;
}

.transcript {
    color: var(--text-secondary);
    font-style: italic;
}

/* Section Styles */
section {
    padding: 80px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Samples Section */
.samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.sample-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.sample-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.sample-visual {
    height: 150px;
    background: var(--dark-bg);
    padding: 1rem;
}

.sample-waveform {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.sample-info {
    padding: 1.5rem;
}

.sample-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sample-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transcript {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.sample-play-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.sample-play-btn:hover {
    transform: scale(1.05);
}

/* Statistics Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stats-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 2rem;
}

.stats-card.large {
    grid-column: span 2;
}

.stats-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.chart-container {
    height: 250px;
    position: relative;
}

.data-table-container {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 2rem;
}

.data-table-container h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--dark-border);
}

.data-table th {
    background: var(--dark-bg);
    color: var(--text-primary);
    font-weight: 600;
}

.data-table td {
    color: var(--text-secondary);
}

.data-table tr:hover {
    background: var(--dark-bg);
}

/* Category Badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.category-badge.greeting {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.category-badge.command {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

.category-badge.question {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

/* Technologies Section */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    transition: all 0.3s;
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.tech-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.tech-icon.wav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tech-icon.mp3 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tech-icon.numpy {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.tech-icon.librosa {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.tech-icon.tensorflow {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.tech-icon.pytorch {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.tech-item span {
    font-weight: 600;
    color: var(--text-primary);
}

/* Code Section */
.code-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--dark-border);
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
    top: 1px;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.code-content {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    overflow: hidden;
}

.code-block {
    display: none;
    padding: 2rem;
    margin: 0;
    overflow-x: auto;
}

.code-block.active {
    display: block;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.code-block .comment {
    color: #64748b;
}

.code-block .keyword {
    color: #c792ea;
}

.code-block .string {
    color: #c3e88d;
}

.code-block .function {
    color: #82aaff;
}

.code-block .number {
    color: #f78c6c;
}

/* Spectrogram Section */
.spectrogram-section {
    background: var(--dark-surface);
    margin: 0 20px;
    border-radius: 24px;
    padding: 4rem 0;
}

.spectrogram-demo {
    max-width: 900px;
    margin: 0 auto;
}

.spectrogram-card {
    padding: 2rem;
}

.spectrogram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.spectrogram-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.spectrogram-controls {
    display: flex;
    gap: 0.5rem;
}

.spec-btn {
    padding: 0.5rem 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.spec-btn.active, .spec-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.spectrogram-canvas-container {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    height: 300px;
}

.spectrogram-canvas-container canvas {
    width: 100%;
    height: 100%;
}

.spectrogram-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.info-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--dark-bg);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.info-badge i {
    color: var(--primary-color);
}

/* Use Cases Section */
.use-cases-section {
    padding: 80px 20px;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.use-case-card {
    padding: 2rem;
    transition: all 0.3s;
}

.use-case-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
}

.use-case-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
}

.gradient-bg-1 { background: var(--gradient-1); }
.gradient-bg-2 { background: var(--gradient-2); }
.gradient-bg-3 { background: var(--gradient-3); }
.gradient-bg-4 { background: var(--gradient-4); }
.gradient-bg-5 { background: var(--gradient-5); }
.gradient-bg-6 { background: var(--gradient-6); }

.use-case-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.use-case-card > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.use-case-features {
    list-style: none;
}

.use-case-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.use-case-features li i {
    color: var(--success-color);
    font-size: 0.8rem;
}

/* FAQ Section */
/* How to Use Section */
.how-to-use-section {
    padding: 6rem 0;
    background: var(--dark-bg);
}

.how-to-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.step-card {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-xl);
}

.step-card:hover::before {
    opacity: 1;
}

.step-number {
    min-width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-content h3 i {
    color: var(--primary-color);
}

.step-content > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.code-example {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--dark-border);
}

.code-example .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid var(--dark-border);
}

.code-example .code-lang {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
    background: transparent;
}

.code-example code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.quick-start-card {
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 16px;
}

.quick-start-card h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quick-start-card h3 i {
    color: var(--primary-color);
    font-size: 2rem;
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    border: 1px solid var(--dark-border);
    transition: all 0.3s ease;
}

.command-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.command-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.command-content h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.command-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
}

.resources-card {
    padding: 2.5rem;
    border-radius: 16px;
}

.resources-card h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.resources-card h3 i {
    color: var(--primary-color);
    font-size: 2rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    border: 1px solid var(--dark-border);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.resource-link:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
}

.resource-link i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.resource-link span {
    font-weight: 500;
}

@media (max-width: 768px) {
    .step-card {
        flex-direction: column;
        gap: 1.5rem;
    }

    .step-number {
        align-self: flex-start;
    }

    .commands-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }

    .quick-start-card,
    .resources-card {
        padding: 1.5rem;
    }
}

.faq-section {
    padding: 80px 20px;
    background: var(--dark-surface);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--dark-bg);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    text-align: left;
    transition: all 0.3s;
}

.faq-question:hover {
    background: var(--dark-surface);
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Newsletter Section */
.newsletter-section {
    padding: 40px 20px;
}

.newsletter-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.newsletter-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.newsletter-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.newsletter-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.newsletter-content p {
    color: var(--text-secondary);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.newsletter-form input:focus {
    border-color: var(--primary-color);
}

.newsletter-form button {
    padding: 0.875rem 1.5rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Copy Code Button */
.copy-code-btn {
    margin-left: auto;
    padding: 0.75rem 1.5rem;
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.copy-code-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.copy-code-btn.copied {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast i {
    color: var(--success-color);
    font-size: 1.2rem;
}

/* Download Section */
.download-section {
    background: var(--dark-surface);
    border-radius: 24px;
    margin: 0 20px;
}

.download-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem;
    align-items: center;
}

.download-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.download-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
}

.download-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.download-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.info-item i {
    color: var(--primary-color);
}

.download-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-download {
    background: var(--gradient-1);
    color: white;
}

.btn-github {
    background: var(--dark-bg);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
}

.file-preview {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--dark-border);
}

.file-tree {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.tree-item {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tree-item.folder {
    color: var(--primary-color);
}

.tree-item.file {
    color: var(--text-muted);
}

.indent-1 {
    padding-left: 1.5rem;
}

.indent-2 {
    padding-left: 3rem;
}

/* Footer */
.footer {
    background: var(--dark-surface);
    border-top: 1px solid var(--dark-border);
    padding: 4rem 20px 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-border);
    text-align: center;
    color: var(--text-muted);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .download-card {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .stats-card.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .features-grid,
    .samples-grid,
    .use-cases-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-actions {
        display: none;
    }

    .newsletter-card {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-content {
        flex-direction: column;
    }

    .newsletter-form {
        flex-direction: column;
        width: 100%;
        max-width: none;
    }

    .spectrogram-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cursor, .cursor-follower {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s, box-shadow 0.3s;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Glow Effect */
.glow {
    position: relative;
}

.glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-1);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.3s;
}

.glow:hover::before {
    opacity: 0.5;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--dark-surface) 25%, var(--dark-border) 50%, var(--dark-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

2,308 lines•44 KB
css
🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer