Changeset 37658 for gs3-extensions


Ignore:
Timestamp:
2023-04-13T13:45:45+12:00 (13 months ago)
Author:
davidb
Message:

Tweaks after testing

Location:
gs3-extensions/structured-audio/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/structured-audio/trunk/TEST-DIARIZATION.sh

    r37657 r37658  
    33source ./_config.bash
    44
    5 test_audio_filename=${1:-test-audio/tst00.wav}
     5test_audio_ifilename=${1:-test-audio/tst00.wav}
     6test_csv_ofilename=${test_audio_ifilename%.*}.csv
    67
    7 test_dir=${test_audio_filename%/*}
    8 test_file=${test_audio_filename##*/}
     8./bin/script/diarization.py $test_audio_ifilename $test_csv_ofilename
    99
    10 ./bin/script/diarization.py $test_audio_filename test-audio/tst00.csv
    1110
     11echo ""
     12echo "Diarization output file:"
     13echo "    $test_csv_ofilename"
     14echo ""
  • gs3-extensions/structured-audio/trunk/_config.bash

    r37656 r37658  
    1616    echo ""
    1717    echo "Warning: Environment variable PYTHON3_HOME not set"
    18 elif [ "$PYTHON3_HOME" != "$GSDL3_EXTCLI_HOME/selfcontained-python3" ] ; then
    19     echo ""
    20     echo "Warning: Environment variable PYTHON3_HOME is set, but is not the "
    21     echo "         directory \$GSDL3_EXTCLI_HOME/selfcontained-python3:"
    22     echo "           $GSDL3_EXTCLI_HOME/selfcontained-python3"
     18else
     19    PYTHON3_PARENT_HOME=${PYTHON3_HOME%/*}
     20    if [ "$PYTHON3_PARENT_HOME" != "$GSDL3_EXTCLI_HOME/selfcontained-python3" ] ; then
     21    echo ""
     22    echo "Warning: Environment variable PYTHON3_HOME is set, but its immediate parent directory "
     23    echo "         is not the directory \$GSDL3_EXTCLI_HOME/selfcontained-python3:"
     24    echo "           $GSDL3_EXTCLI_HOME/selfcontained-python3"
     25    fi
    2326fi
    2427
     
    3235fi
    3336
     37echo ""
    3438echo "Changing the value of \$HOME to:"
    3539echo "  $HOME"
    36 echo "So pip installed packages (which can consume significant disk space)"
     40echo ""
     41echo "This is so pip installed packages (which can consume significant disk space)"
    3742echo "are stored in the same area as the Greenstone installation, rather"
    3843echo "than the user's home"
  • gs3-extensions/structured-audio/trunk/bin/script/diarization.py.in

    r37656 r37658  
    11#!/usr/bin/env python3
     2
    23from pyannote.audio import Pipeline
    34from pathlib import Path
     
    67# remove available graphic cards to trigger cpu default
    78os.environ["CUDA_VISIBLE_DEVICES"] = ""
     9
     10if os.environ["GSDL3_EXTCLI_HOME"] is not None and os.environ["GSDL3_EXTCLI_HOME"] != "":
     11    os.environ["HOME"]=os.path.join(os.environ["GSDL3_EXTCLI_HOME"],"python3-user-home")
     12    print("Setting HOME=%s for pyannote models" % os.environ["HOME"])
     13                         
    814
    915from huggingface_hub import HfApi
Note: See TracChangeset for help on using the changeset viewer.