# Path: conf/userconf.py



from sys import platform
from subprocess import call
from conf.userconf import user_snack_lib_path
import os
import sys
import inspect
import numpy as np
import logging
        import tkinter
            import Tkinter as tkinter
        import tkinter
            import Tkinter as tkinter
    Note this method can only be used if Tcl is installed.

    The vectors returned here are the raw Snack output, without padding.
    For more info, see documentation for snack_raw_pitch().
    """
    # File path for wav file provided to Tcl script
    in_file = wav_fn

    # ERROR: wind_dur parameter must be between [0.0001, 0.1].
    # ERROR: frame_step parameter must be between [1/sampling rate, 0.1].
    # invalid/inconsistent parameters -- exiting.

    # HACK: Tcl shell expects double backslashes in Windows path
    if sys.platform == 'win32' or sys.platform == 'cygwin': # pragma: no cover
        in_file = in_file.replace('\\', '\\\\')

    # Name of the file containing the Tcl script
    tcl_file = os.path.join(os.path.dirname(wav_fn), 'tclforsnackpitch.tcl')

    # Write Tcl script which will call Snack pitch calculation
    f = open(tcl_file, 'w')
    script = "#!/usr/bin/env bash\n"
    script += '# the next line restarts with tclsh \\\n'
    script += 'exec {} "$0" "$@"\n\n'.format(tcl_shell_cmd)
    # HACK: The variable user_snack_lib_path is a hack we use in continous
    #       integration testing. The reason is that we may not have the
    #       permissions to copy the Snack library to the standard Tcl library
    #       location. This is a workaround to load the Snack library from a
    #       different location, where the location is given by
    #       user_snack_lib_path.

# Path: conf/userconf.py



# Path: opensauce/snack.py
from sys import platform
from subprocess import call
from conf.userconf import user_snack_lib_path
import os
import sys
import inspect
import numpy as np
import logging
        import tkinter
            import Tkinter as tkinter
        import tkinter
            import Tkinter as tkinter

    Note this method can only be used if Tcl is installed.

    The vectors returned here are the raw Snack output, without padding.
    For more info, see documentation for snack_raw_pitch().
    """
    # File path for wav file provided to Tcl script
    in_file = wav_fn

    # ERROR: wind_dur parameter must be between [0.0001, 0.1].
    # ERROR: frame_step parameter must be between [1/sampling rate, 0.1].
    # invalid/inconsistent parameters -- exiting.

    # HACK: Tcl shell expects double backslashes in Windows path
    if sys.platform == 'win32' or sys.platform == 'cygwin': # pragma: no cover
        in_file = in_file.replace('\\', '\\\\')

    # Name of the file containing the Tcl script
    tcl_file = os.path.join(os.path.dirname(wav_fn), 'tclforsnackpitch.tcl')

    # Write Tcl script which will call Snack pitch calculation
    f = open(tcl_file, 'w')
    script = "#!/usr/bin/env bash\n"
    script += '# the next line restarts with tclsh \\\n'
    script += 'exec {} "$0" "$@"\n\n'.format(tcl_shell_cmd)
    # HACK: The variable user_snack_lib_path is a hack we use in continous
    #       integration testing. The reason is that we may not have the
    #       permissions to copy the Snack library to the standard Tcl library
    #       location. This is a workaround to load the Snack library from a
    #       different location, where the location is given by
    #       user_snack_lib_path.

    if user_snack_lib_path is not None: