MCPcopy Create free account
hub / github.com/FunAudioLLM/FunMusic / env_variables

Function env_variables

inspiremusic/cli/inference.py:26–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24from inspiremusic.utils.audio_utils import trim_audio, fade_out, process_audio
25
26def env_variables():
27 os.environ['PYTHONIOENCODING'] = 'UTF-8'
28 os.environ['TOKENIZERS_PARALLELISM'] = 'False'
29 current_working_dir = os.getcwd()
30 main_root = os.path.realpath(os.path.join(current_working_dir, '../../'))
31 bin_dir = os.path.join(main_root, 'inspiremusic')
32 third_party_matcha_tts_path = os.path.join(main_root, 'third_party', 'Matcha-TTS')
33 python_path = f"{main_root}:{bin_dir}:{third_party_matcha_tts_path}:{os.environ.get('PYTHONPATH', '')}"
34 os.environ['PYTHONPATH'] = python_path
35 sys.path.extend([main_root, third_party_matcha_tts_path])
36
37class InspireMusicModel:
38 def __init__(self,

Callers 2

music_generationFunction · 0.90
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected