Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/open-mmlab/Amphion
09 September 2024, 06:46:44 UTC
  • Code
  • Branches (2)
  • Releases (3)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    • refs/heads/revert-154-FACodec-readme
    • v0.1.1-alpha
    • v0.1.0-alpha
    • v0.1.0
  • 50adafb
  • /
  • egs
  • /
  • metrics
  • /
  • run.sh
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:47d735ef577c90175b8a9e9055bc9fd5d94311de
origin badgedirectory badge
swh:1:dir:f2f88a4cad500439cdba5df9e4a211a1d62a9916
origin badgerevision badge
swh:1:rev:251c6690ae3de6d04454876fbb864e8664951bc8
origin badgesnapshot badge
swh:1:snp:bef780d851faeac80aef6db569e51e66f505bf34

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: 251c6690ae3de6d04454876fbb864e8664951bc8 authored by Harry He on 06 September 2024, 13:52:56 UTC
update Amphion/Emilia references (#271)
Tip revision: 251c669
run.sh
# Copyright (c) 2023 Amphion.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

######## Build Experiment Environment ###########
exp_dir=$(cd `dirname $0`; pwd)
work_dir=$(dirname $(dirname $exp_dir))

export WORK_DIR=$work_dir
export PYTHONPATH=$work_dir
export PYTHONIOENCODING=UTF-8

######## Parse the Given Parameters from the Commond ###########
options=$(getopt -o c:n:s --long gpu:,reference_folder:,generated_folder:,dump_folder:,metrics:,fs:,align_method:,energy_db_scale:,f0_subtract_mean:,similarity_model:,similarity_mode:,ltr_path:,intelligibility_mode:,language: -- "$@")
eval set -- "$options"

while true; do
  case $1 in
    # Visible GPU machines. The default value is "0".
    --gpu) shift; gpu=$1 ; shift ;;
    # Reference Audio Folder
    --reference_folder) shift; ref_dir=$1 ; shift ;;
    # Generated Audio Folder
    --generated_folder) shift; deg_dir=$1 ; shift ;;
    # Result Dumping Folder
    --dump_folder) shift; dump_dir=$1 ; shift ;;
    # Metrics to Compute
    --metrics) shift; metrics=$1 ; shift ;;
    # Sampling Rate
    --fs) shift; fs=$1 ; shift ;;

    # Method for aligning F0. The default value is "cut"
    --align_method) shift; align_method=$1 ; shift ;;
    # Method for normalizing F0. The default value is "True"
    --f0_subtract_mean) shift; f0_subtract_mean=$1 ; shift ;;
    # Method for normalizing Energy. The default value is "True"
    --energy_db_scale) shift; energy_db_scale=$1 ; shift ;;

    # Model for computing speaker similarity. The default value is "wavlm"
    --similarity_model) shift; similarity_model=$1 ; shift ;;
    # Mode for computing speaker similarity. The default value is "pairwith"
    --similarity_mode) shift; similarity_mode=$1 ; shift ;;
    
    # Path for the transcript.
    --ltr_path) shift; ltr_path=$1 ; shift ;;
    # Mode for computing CER and WER. The default value is "gt_audio"
    --intelligibility_mode) shift; intelligibility_mode=$1 ; shift ;;
    # Language for computing CER and WER. The default value is "english"
    --language) shift; language=$1 ; shift ;;

    --) shift ; break ;;
    *) echo "Invalid option: $1" exit 1 ;;
  esac
done

### Value check ###
if [ -z "$ref_dir" ]; then
    echo "[Error] Please specify the reference_folder"
    exit 1
fi

if [ -z "$deg_dir" ]; then
    echo "[Error] Please specify the generated_folder"
    exit 1
fi

if [ -z "$dump_dir" ]; then
    echo "[Error] Please specify the dump_folder"
    exit 1
fi

if [ -z "$metrics" ]; then
    echo "[Error] Please specify the metrics"
    exit 1
fi

if [ -z "$gpu" ]; then
    gpu="0"
fi

if [ -z "$fs" ]; then
    fs="None"
fi

if [ -z "$align_method" ]; then
    align_method="dtw"
fi

if [ -z "$energy_db_scale" ]; then
    energy_db_scale="True"
fi

if [ -z "$f0_subtract_mean" ]; then
    f0_subtract_mean="True"
fi

if [ -z "$similarity_model" ]; then
    similarity_model="wavlm"
fi

if [ -z "$similarity_mode" ]; then
    similarity_mode="pairwith"
fi

if [ -z "$ltr_path" ]; then
    ltr_path="None"
fi

if [ -z "$intelligibility_mode" ]; then
    intelligibility_mode="gt_audio"
fi

if [ -z "$language" ]; then
    language="english"
fi

######## Calculate Objective Metrics ###########
CUDA_VISIBLE_DEVICES=$gpu python "$work_dir"/bins/calc_metrics.py \
    --ref_dir $ref_dir \
    --deg_dir $deg_dir \
    --dump_dir $dump_dir \
    --metrics $metrics \
    --fs $fs \
    --align_method $align_method \
    --db_scale $energy_db_scale \
    --f0_subtract_mean $f0_subtract_mean \
    --similarity_model $similarity_model \
    --similarity_mode $similarity_mode \
    --ltr_path $ltr_path \
    --intelligibility_mode $intelligibility_mode \
    --language $language

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API