Metrify RawNet3/Resemblyzer as Keywords & Update READMEs #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request includes modifications to further integrate Resemblyzer into Amphion's evaluation process, which includes:
Modifying the cosine similarity calculation method: Previously, the
resemblyzer_similarity.py
used thescipy.spatial.distance.cosine
method for calculating cosine similarity. This update replaces it with PyTorch'storch.nn.functional.cosine_similarity
method, which is already used by other scripts to simplify the codebase and ensure uniformity.Metrifying RawNet3/Resemblyzer as keywords: Altered the
--metrics
argument handling fromspeaker_similarity
torawnet3_similarity
andresemblyzer_similarity
as distinct options to streamline the evaluation process by removing the need for user input during script execution.Testing
Changes
Amphion/evaluation/metrics/similarity/resemblyzer_similarity.py:
scipy.spatial.distance.cosine
totorch.nn.functional.cosine_similarity
method.Amphion/bins/calc_metrics.py:
speaker_similarity
to two distinct options:rawnet3_similarity
andresemblyzer_similarity
.Amphion/egs/metrics/README.md:
speaker_similarity
keyword withrawnet3_similarity
andresemblyzer_similarity
, and fixed misspelling.Amphion/README.md:
Usage
When calculating speaker similarity with
Amphion/egs/metrics/run.sh
using the command--metrics
, the user shall select the desired model (RawNet3/Resemblyzer) for calculation with the corresponding keyword (rawnet3_similarity
/resemblyzer_similarity
).