### Training Configuration Example Source: https://github.com/marianne-m/brouhaha-vad/blob/main/doc/training.md Example of a config.yaml file for training with custom hyper-parameters and task parameters. This allows for fine-grained control over the training process. ```yaml task: duration: 2.0 batch_size: 64 lambda_vad: 1 architecture: sincnet: stride: 10 sample_rate: 16000 lstm: hidden_size: 128 num_layers: 2 bidirectional: true monolithic: true dropout: 0.0 batch_first: true linear: hidden_size: 128 num_layers: 2 ``` -------------------------------- ### Clone and Install Brouhaha Source: https://github.com/marianne-m/brouhaha-vad/blob/main/README.md Steps to clone the repository, create and activate a conda environment, and install the Brouhaha package. ```bash git clone https://github.com/marianne-m/brouhaha-vad.git cd brouhaha-vad conda create -n brouhaha python=3.8 conda activate brouhaha pip install . ``` -------------------------------- ### Install libsndfile Source: https://github.com/marianne-m/brouhaha-vad/blob/main/README.md Command to install the libsndfile library using conda, which may be required depending on the environment. ```bash conda install -c conda-forge libsndfile ``` -------------------------------- ### Install pyannote-brouhaha-db Source: https://github.com/marianne-m/brouhaha-vad/blob/main/doc/training.md Install the necessary package for Brouhaha data. Ensure you have activated the 'brouhaha' conda environment first. ```bash conda activate brouhaha pip install https://github.com/marianne-m/pyannote-brouhaha-db.git ``` -------------------------------- ### Example Usage of Scattered Boxplot Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Demonstrates a single call to the scattered_boxplot function with specific parameters for validation metric and disabling saving. This is useful for quick visualization during analysis. ```python # One example of scattered boxplot scattered_boxplot(data_all, metric="ValidationMetric", save=False) ``` -------------------------------- ### Train the Model Source: https://github.com/marianne-m/brouhaha-vad/blob/main/doc/training.md Command to initiate model training. Specify the experimental directory, pipeline, model type, number of epochs, and data directory. ```bash python main.py train /path/to/experimental/directory \ -p Brouhaha.SpeakerDiarization.NoisySpeakerDiarization \ --model_type pyannet \ --epoch 35 \ --data_dir path/to/your/database ``` -------------------------------- ### Train Model with Config File Source: https://github.com/marianne-m/brouhaha-vad/blob/main/doc/training.md Command to train the model using a specified config.yaml file. Include the --config flag to use the custom configuration. ```bash python main.py train /path/to/experimental/directory \ -p Brouhaha.SpeakerDiarization.NoisySpeakerDiarization \ --model_type pyannet \ --epoch 35 \ --data_dir path/to/your/database \ --config ``` -------------------------------- ### Define Brouhaha Database Path Source: https://github.com/marianne-m/brouhaha-vad/blob/main/doc/training.md Configure the database path in the ~/.pyannote/database.yml file. This specifies the location and naming convention for your audio files. ```yaml Databases: Brouhaha: Path/to/your/database/*/audio_16k/{uri}.flac ``` -------------------------------- ### Apply the Model for Inference Source: https://github.com/marianne-m/brouhaha-vad/blob/main/doc/training.md Command to apply the trained model for inference on the test dataset. Specify output directory, file extension, and optionally a parameters file. ```bash python main.py apply \ -p Brouhaha.SpeakerDiarization.NoisySpeakerDiarization \ --model_path path/to/the/model/checkpoint \ --data_dir path/to/your/database \ --out_dir path/to/the/inference/output/folder \ --ext wav \ --params path/to/best/params/yaml/file ``` -------------------------------- ### Define Metrics and Parameters Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Defines dictionaries and lists for metric names, parameter names, and their corresponding display names. This aids in standardizing metric and parameter references throughout the analysis. ```python METRIC_NAMES = { "ValidationMetric": "(mae(snr)+mae(c50)+(1-fscore(vad))/3", # "ValidationMetric": r'\frac{(1-F-score(VAD))+NMAE(SNR)+NMAE(C50)}{3}', "c50ValMetric": "C50 MAE", "snrValMetric": "SNR MAE", "vadValMetric": "VAD F-score" } METRICS = [ "ValidationMetric", "c50ValMetric", "snrValMetric", "vadValMetric" ] PARAMS = [ "dropout", "duration", "batch_size", "hidden_size", "num_layers" ] PARAMS_NAMES = { "dropout": "Dropout", "duration": "Duration (s)", "batch_size": "Batch size", "hidden_size": "LSTM Hidden size", "num_layers": "Number of LSTM layers" } ``` -------------------------------- ### Configure Plotting Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Sets up Matplotlib for aesthetically pleasing plots with specific font and size configurations. This is useful for ensuring consistent plot appearance across different analyses. ```python # making plots look good import matplotlib.pyplot as plt import matplotlib plt.rcParams['text.usetex'] = False matplotlib.rcParams['font.family'] = 'sans-serif' matplotlib.rcParams['font.serif'] = 'Arial' matplotlib.rcParams.update({'font.size': 14, 'legend.handleheight':1, 'hatch.linewidth': 1.0, 'lines.markersize':4, 'lines.linewidth':1.5,'xtick.labelsize':14}) cm = 1/2.54 H = 14.56 W = 9 # Lexical: phones + phones with space # fig, ax = plt.subplots(1,1, figsize=(H*cm,W*cm), constrained_layout=True) ``` -------------------------------- ### Define Plotting Parameters for Datasets Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Configuration dictionaries for plotting parameters (ratio, scattering, widths) specific to different datasets: original grid search, heldout, and development sets. These parameters control how results are visualized. ```python #on orignal gridsearch PARAMS_PLOT_ORIGINAL = { "vadValMetric": { "ratio": 500, "scattering": 0.119, "widths": 0.5 }, "ValidationMetric": { "ratio": 220, "scattering": 0.095, "widths": 0.5 }, "c50ValMetric": { "ratio": 2.2, "scattering": 0.122, "widths": 0.5 }, "snrValMetric": { "ratio": 3, "scattering": 0.095, "widths": 0.5 } } # on heldout PARAMS_PLOT_HELDOUT = { "vadValMetric": { "ratio": 0.7, "scattering": 0.122, "widths": 0.5 }, "ValidationMetric": { "ratio": 120, "scattering": 0.095, "widths": 0.5 }, "c50ValMetric": { "ratio": 1, "scattering": 0.122, "widths": 0.5 }, "snrValMetric": { "ratio": 1.1, "scattering": 0.115, "widths": 0.5 } } # on dev PARAMS_PLOT_DEV = { "vadValMetric": { "ratio": 3.5, "scattering": 0.099, "widths": 0.5 }, "ValidationMetric": { "ratio": 400, "scattering": 0.095, "widths": 0.5 }, "c50ValMetric": { "ratio": 4, "scattering": 0.12, "widths": 0.5 }, "snrValMetric": { "ratio": 3.5, "scattering": 0.115, "widths": 0.5 } } ``` -------------------------------- ### Execute Best Model Analysis Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Calls the `print_best_model_values` function with the `data_all` DataFrame to display the analysis results. Ensure `data_all` is loaded and preprocessed before execution. ```python print_best_model_values(data_all) ``` -------------------------------- ### Import Libraries Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Imports essential libraries for data manipulation, numerical operations, and plotting. ```python import pandas as pd import numpy as np import latex # import seaborn as sns ``` -------------------------------- ### Analyze Grid Search Results on Development Data Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb This snippet re-runs the best model analysis using `data_on_dev_all`, which likely contains performance metrics from a development or testing set. It prints the best model and epoch for this specific dataset. ```python best_mod = best_models(data_on_dev_all) best = data[data["name"] == best_mod["ValidationMetric"]["model"]] for key, values in best_mod.items(): print(f"Best model for {key}: {values['model']}, with value {values['value']}") # print(best_mod) print(f"\nFor the best model {best_mod['ValidationMetric']['model']}") print(f"\tbest epoch : {best['best_epoch'].iloc[0]}") # print(f"\toptimal threshold : {best['vadOptiTh'].iloc[0]}") ``` -------------------------------- ### Print Best Model Performance Details Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Prints a summary of the best models found for each metric and details about the best epoch for the overall best model. This function requires the `best_models` function to be defined and a pandas DataFrame with model performance data. ```python def print_best_model_values(data): best_mod = best_models(data) best = data[data["name"] == best_mod["ValidationMetric"]["model"]] for key, values in best_mod.items(): print(f"Best model for {key}: {values['model']}, with value {values['value']}") # print(best_mod) print(f"\nFor the best model {best_mod['ValidationMetric']['model']}") print(f"\tbest epoch : {best['best_epoch'].iloc[0]}") # print(f"\toptimal threshold : {best['vadOptiTh'].iloc[0]}") ``` -------------------------------- ### Tune Voice Activity Detection Threshold Source: https://github.com/marianne-m/brouhaha-vad/blob/main/doc/training.md Command to tune the VAD threshold after training. Specify the experimental directory, model path, data directory, and optionally a parameters file. ```bash python main.py tune /path/to/experimental/directory \ -p Brouhaha.SpeakerDiarization.NoisySpeakerDiarization \ --model_path path/to/the/model/checkpoint \ --data_dir path/to/your/database \ --params path/to/best/params/yaml/file ``` -------------------------------- ### Load and Merge Grid Search Data on Development Set Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Loads grid search data specifically for the development set from a CSV file and merges it with 'name' and 'best_epoch' columns from the main grid search data. It then splits the merged data based on the 'only_vad' flag. ```python # load csv with all the data data_on_dev = pd.read_csv("csv_files/gridsearch_data_on_dev.csv", index_col=0) data_on_dev = pd.merge(data_on_dev, data[["name", "best_epoch"]], on="name") data_on_dev_all = data_on_dev[data_on_dev["only_vad"]==False].reset_index(drop=True) data_on_dev_only_vad = data_on_dev[data_on_dev["only_vad"]==True].reset_index(drop=True) data_on_dev.head() ``` -------------------------------- ### Load and Split Grid Search Data Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Loads grid search results from a CSV file and splits the data into two DataFrames: one with all data and another containing only VAD (Voice Activity Detection) related results. Assumes 'only_vad' column exists for filtering. ```python # load csv with all the data data = pd.read_csv("csv_files/gridsearch_data.csv", index_col=0) data_all = data[data["only_vad"]==False].reset_index(drop=True) data_only_vad = data[data["only_vad"]==True].reset_index(drop=True) data.head() ``` -------------------------------- ### Prepare DataFrames for F-score Analysis Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Creates and renames DataFrames to isolate F-score metrics and duration for plotting. Ensures consistent column names for comparison. ```python all_fscore = pd.DataFrame.from_records(matched_final[["vadValMetric_all", "duration"]]) only_vad_fscore = pd.DataFrame(matched_final[["vadValMetric_only_vad", "duration"]]) all_fscore.rename(columns={"vadValMetric_all": "vadValMetric"}, inplace=True) only_vad_fscore.rename(columns={"vadValMetric_only_vad": "vadValMetric"}, inplace=True) ``` -------------------------------- ### Load Heldout Dataset Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Loads the grid search results from a CSV file into a pandas DataFrame. It then filters the data to separate results that include 'only_vad' from those that do not, resetting the index for clean dataframes. ```python data_heldout = pd.read_csv("csv_files/gridsearch_on_heldout.csv", index_col=0) data_heldout_all = data_heldout[data_heldout["only_vad"]==False].reset_index(drop=True) data_heldout_only_vad = data_heldout[data_heldout["only_vad"]==True].reset_index(drop=True) data_heldout.head() ``` -------------------------------- ### Prepare and Merge DataFrames Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Selects relevant columns and merges two DataFrames based on common hyperparameters. Useful for comparing model performance across different training configurations. ```python relevant_columns = ["duration", "batch_size", "hidden_size", "num_layers", "dropout", "name", "vadValMetric"] df_1 = data_on_dev_only_vad[relevant_columns] df_2 = data_on_dev_all[relevant_columns] matched_final = pd.merge(df_1, df_2, on=["duration", "batch_size", "hidden_size", "num_layers", "dropout"], suffixes=(_only_vad, _all)) matched_final.head() ``` -------------------------------- ### Generate Plots for 'dev' Dataset Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Iterates through predefined metrics and parameters to generate scattered box plots for the 'dev' dataset. Ensure 'METRICS', 'PARAMS', and 'data_on_dev_all' are defined and 'scattered_boxplot' function is available. ```python # generate all plots for metric in METRICS: for param in PARAMS: scattered_boxplot(data_on_dev_all, param, metric, dataset_name="dev") ``` -------------------------------- ### Visualize F-score Comparison Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Generates a linked boxplot to compare the F-score on the dev set between experiments with VAD, SNR, and C50 predictions and experiments with only VAD predictions. Saves the figure to a specified output path. ```python all_fscore_vad = all_fscore["vadValMetric"] only_vad_fscore_vad = only_vad_fscore["vadValMetric"] scattered_boxplot_linked( all_fscore_vad, only_vad_fscore_vad, ["Exp. with prediction of VAD, SNR and C50", "Exp. with only vad"], "F-score on dev set", output="figures/vad_vs_snr_c50_vad/linked_fscore.png" ) ``` -------------------------------- ### Create Linked Scatter Plot and Box Plot Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Generates a visualization comparing two conditions using scatter plots and box plots. It highlights the proportion of 'red' (condition 1 < condition 2) and 'green' (condition 1 >= condition 2) outcomes. Requires matplotlib and numpy. ```python import matplotlib.pyplot as plt import numpy as np def scattered_boxplot_linked(condition_1, condition_2, names, title, output=None): vals, xs = [],[] cols = [condition_1, condition_2] for i, col in enumerate(cols): vals.append(col) xs.append(np.random.normal(i + 1, 0.04, len(col))) colors = ["red" if mid < dist else "green" for mid,dist in zip(vals[0], vals[1])] plt.figure(figsize=(13,13)) for i in range(len(vals[1])): plt.plot([xs[0][i],xs[1][i]], [vals[0][i],vals[1][i]], color=colors[i], alpha=0.1) plt.boxplot(vals, labels=names, showfliers=False) palette = ['black', 'black'] for x, val, c in zip(xs, vals, palette): plt.scatter(x, val, alpha=0.4, color=c, s=0.5) print(f"red proportion : {colors.count('red')/len(colors)}") print(f"green proportion : {colors.count('green')/len(colors)}") plt.ylabel('F-score') plt.title(title) plt.savefig(output) ``` -------------------------------- ### Generate All Grid Search Plots Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Iterates through predefined metrics and parameters to generate scattered boxplots for all combinations, saving them for the 'heldout' dataset. This is used for comprehensive analysis of grid search results. ```python # generate all plots for metric in METRICS: for param in PARAMS: scattered_boxplot(data_heldout_all, param, metric, dataset_name="heldout") ``` -------------------------------- ### Generate Plots for 'original' Dataset Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Iterates through predefined metrics and parameters to generate scattered box plots for the 'original' dataset. Ensure 'METRICS', 'PARAMS', and 'data_all' are defined and 'scattered_boxplot' function is available. ```python # generate all plots for metric in METRICS: for param in PARAMS: scattered_boxplot(data_all, param, metric, dataset_name="original") ``` -------------------------------- ### Score the Model Source: https://github.com/marianne-m/brouhaha-vad/blob/main/doc/training.md Command to score the model's performance. This computes F-Score for VAD, MSE for SNR, and MSE for C50. Specify relevant paths for model, data, output, and reports. ```bash python main.py score \ -p Brouhaha.SpeakerDiarization.NoisySpeakerDiarization \ --model_path path/to/the/model/checkpoint \ --data_dir path/to/your/database \ --out_dir path/to/the/inference/output/folder \ --report_path path/to/score/files ``` -------------------------------- ### Function to Select Plotting Parameters by Dataset Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb A function that returns the appropriate plotting parameter dictionary based on the provided dataset name ('original', 'dev', or 'heldout'). This simplifies the process of applying dataset-specific visualization settings. ```python def params_plot(dataset_name): if dataset_name == "original": return PARAMS_PLOT_ORIGINAL if dataset_name == "dev": return PARAMS_PLOT_DEV elif dataset_name == "heldout": return PARAMS_PLOT_HELDOUT ``` -------------------------------- ### pyannote.audio BibTeX Citation Source: https://github.com/marianne-m/brouhaha-vad/blob/main/README.md BibTeX entry for citing the pyannote.audio paper. ```bibtex @inproceedings{Bredin2020, Title = {{pyannote.audio: neural building blocks for speaker diarization}}, Author = {{Bredin}, Herv{"e} and {Yin}, Ruiqing and {Coria}, Juan Manuel and {Gelly}, Gregory and {Korshunov}, Pavel and {Lavechin}, Marvin and {Fustes}, Diego and {Titeux}, Hadrien and {Bouaziz}, Wassim and {Gill}, Marie-Philippe}, Booktitle = {ICASSP 2020, IEEE International Conference on Acoustics, Speech, and Signal Processing}, Address = {Barcelona, Spain}, Month = {May}, Year = {2020}, } ``` -------------------------------- ### Extract Predictions with Brouhaha Source: https://github.com/marianne-m/brouhaha-vad/blob/main/README.md Command to run the Brouhaha model for prediction extraction. Specify data directory, output directory, model path, and audio file extension. ```bash python brouhaha/main.py apply \ --data_dir path/to/data \ --out_dir path/to/predictions \ --model_path models/best/checkpoints/best.ckpt \ --ext wav ``` -------------------------------- ### Create Linked Scatter Plot and Box Plot by Duration Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Generates a grid of scatter and box plots, comparing two conditions across different durations. It visualizes F-scores and calculates the proportion of outcomes where the first condition is less than the second ('red') versus greater than or equal to ('green') for each duration. Requires matplotlib and numpy. ```python import matplotlib.pyplot as plt import numpy as np def scattered_boxplot_linked_by_duration(condition_1, condition_2, names, title, output=None): fig, axes = plt.subplots(2,2, figsize=(17,17)) durations = [4, 6, 8, 10] ax = [axes[0,0], axes[0,1], axes[1,0], axes[1,1]] for dur, axe in zip(durations, ax): vals, xs = [],[] cond_1 = condition_1[condition_1.duration == dur] cond_2 = condition_2[condition_2.duration == dur] cols = [cond_1["vadValMetric"].tolist(), cond_2["vadValMetric"].tolist()] for i, col in enumerate(cols): vals.append(col) xs.append(np.random.normal(i + 1, 0.04, len(col))) colors = ["red" if mid < dist else "green" for mid,dist in zip(vals[0], vals[1])] for i in range(len(vals[1])): axe.plot([xs[0][i],xs[1][i]], [vals[0][i],vals[1][i]], color=colors[i], alpha=0.1) axe.boxplot(vals, labels=names, showfliers=False) palette = ['black', 'black'] for x, val, c in zip(xs, vals, palette): axe.scatter(x, val, alpha=0.4, color=c, s=0.5) axe.set(ylabel='F-score') axe.title.set_text(f"Duration = {dur} seconds") print(f"duration = {dur} seconds") print(f"red proportion : {colors.count('red')/len(colors)}") print(f"green proportion : {colors.count('green')/len(colors)}") # plt.title(title) plt.savefig(output) ``` -------------------------------- ### Find Best Models from Grid Search Data Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Identifies the best model for specified minimum and maximum metrics from a pandas DataFrame. Use this function to programmatically find top-performing models based on criteria like validation loss or accuracy. ```python def best_models(data): metrics_min = ["ValidationMetric", "snrValMetric", "c50ValMetric"] metrics_max = ["vadValMetric"] best = dict() for metric in metrics_min: index = data[metric].idxmin() values = { "model": data.iloc[index]['name'], "value": data.iloc[index][metric] } best[metric] = values for metric in metrics_max: index = data[metric].idxmax() values = { "model": data.iloc[index]['name'], "value": data.iloc[index][metric] } best[metric] = values return best ``` -------------------------------- ### Create Scattered Boxplot for Grid Search Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Generates a scattered boxplot to visualize the distribution of a metric across different values of a monitored parameter. Useful for comparing hyperparameter performance. Requires pandas, numpy, and matplotlib. The figure can be saved to a specified path. ```python def scattered_boxplot( data: pd.DataFrame, param_to_monitor: str = "dropout", metric: str = 'ValidationMetric', figure_path: str = None, dataset_name: str = "original", save: bool = True ) -> None: PARAMS_PLOT = params_plot(dataset_name) ratio = PARAMS_PLOT[metric]["ratio"] scattering = PARAMS_PLOT[metric]["scattering"] widths = PARAMS_PLOT[metric]["widths"] print(f"ratio : {ratio}") print(f"scattering : {scattering}") print(f"widths : {widths}") possible_values = np.sort(data[param_to_monitor].unique()) if metric == "vadValMetric": coef = 1 else: coef = 1 values = dict() for value in possible_values: values[value] = data[data[param_to_monitor] == value][metric].reset_index(drop=True) * coef default_arch = data[data["name"] == 'dur_2_bs_32_lstm_hs_128_lstm_nl_2_dropout_0'] val_default_arch = default_arch[metric] * coef vals, names, xs = [],[],[] for i, col in enumerate(values.keys()): vals.append(values[col]) names.append(col) xs.append(np.random.normal(i + 1, scattering, len(values[col]))) # adds jitter to the data points - can be adjusted fig, ax = plt.subplots(1,1, figsize=(H*cm,W*cm), constrained_layout=True) ax.set_aspect(ratio) ax.boxplot(vals, labels=names, widths=widths) palette = ['r', 'g', 'b', 'y', 'm'] markers = ['.', '^', 'x', '*', 'p'] for x, val, c, m in zip(xs, vals, palette, markers): ax.scatter(x, val, alpha=0.5, color=c, marker=m, s=60) # y axis plt.xlabel(param_to_monitor.replace('_', ' ').capitalize(), fontweight='normal', fontsize=14) plt.ylabel(METRIC_NAMES[metric], fontweight='normal', fontsize=14) # default architecture # ax.axhline(y=float(val_default_arch), color='k', linestyle='--', alpha=0.7, linewidth=3, label='Default arch.') # ax.legend(bbox_to_anchor=(0.05, 1.15), loc=2, borderaxespad=0., framealpha=1, facecolor ='white', frameon=True) # Hide the right and top spines ax.spines.right.set_visible(False) ax.spines.top.set_visible(False) if not figure_path: figure_path = f"figures/figures_{dataset_name}/{param_to_monitor}_{metric}.png" if save: plt.savefig(figure_path, bbox_inches="tight")#, dpi=300) ``` -------------------------------- ### Call Plotting Function for Duration Comparison Source: https://github.com/marianne-m/brouhaha-vad/blob/main/analyses/gridsearch_analysis/gridsearch_analysis.ipynb Invokes the `scattered_boxplot_linked_by_duration` function to generate a visualization comparing F-scores for models with and without VAD, SNR, and C50 predictions, broken down by duration. Specifies the output file path for the figure. ```python scattered_boxplot_linked_by_duration( all_fscore, only_vad_fscore, ["Exp. with prediction of VAD, SNR and C50", "Exp. with only vad"], "F-score on dev set", output="figures/vad_vs_snr_c50_vad/linked_fscore_by_duration.png" ) ``` -------------------------------- ### Brouhaha BibTeX Citation Source: https://github.com/marianne-m/brouhaha-vad/blob/main/README.md BibTeX entry for citing the Brouhaha paper. ```bibtex @article{lavechin2023brouhaha, Title = {{Brouhaha: multi-task training for voice activity detection, speech-to-noise ratio, and C50 room acoustics estimation}}, Author = {Marvin Lavechin and Marianne Métais and Hadrien Titeux and Alodie Boissonnet and Jade Copet and Morgane Rivière and Elika Bergelson and Alejandrina Cristia and Emmanuel Dupoux and Hervé Bredin}, Year = {2023}, Journal = {ASRU} } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.