Resemblyzer icon indicating copy to clipboard operation
Resemblyzer copied to clipboard

MATPLOTLIB FIGURES NOT DISPLAYING..How to solve this please help..

Open MrinmoyBoruah opened this issue 3 years ago • 2 comments

from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.animation import FuncAnimation from resemblyzer.audio import sampling_rate from matplotlib import cm from time import sleep, perf_counter as timer from umap import UMAP from sys import stderr import matplotlib.pyplot as plt import numpy as np from itertools import groupby from pathlib import Path from tqdm import tqdm from resemblyzer import preprocess_wav, VoiceEncoder from itertools import groupby

wav_fpaths = list(Path("audio_data", "librispeech_test-other").glob("**/*.flac")) speakers = list(map(lambda wav_fpath: wav_fpath.parent.stem, wav_fpaths)) wavs = np.array(list(map(preprocess_wav, tqdm(wav_fpaths, "Preprocessing wavs", len(wav_fpaths))))) speaker_wavs = {speaker: wavs[list(indices)] for speaker, indices in groupby(range(len(wavs)), lambda i: speakers[i])} encoder = VoiceEncoder() utterance_embeds = np.array(list(map(encoder.embed_utterance, wavs)))

def plot_projections(embeds, speakers, ax=None, colors=None, markers=None, legend=True, title="", **kwargs):(utterance_embeds, speakers, title="Embedding projections")

plt.show()

MATPLOTLIB FIGURES ARE NOT DISPLAYING.

MrinmoyBoruah avatar Nov 21 '22 06:11 MrinmoyBoruah

hi, i met same issue, i use vscode jupyter to show the fig, only show the axis, but i use ani.save("animation.mp4", fps=20, writer="ffmpeg") in util.py: interactive_diarization function, the file i saved can display correctly. And i found other problem, the animation delayed. #47

Kiri0824 avatar Feb 29 '24 08:02 Kiri0824

sorry, the fps might not be 20, i think 16 might be great?

Kiri0824 avatar Feb 29 '24 09:02 Kiri0824