diff --git a/.gitignore b/.gitignore index 00000e48..e8af9298 100644 --- a/.gitignore +++ b/.gitignore @@ -163,4 +163,7 @@ cython_debug/ # The large model files *.bin *.gguf -*.onnx \ No newline at end of file +*.onnx + +# pyapp build directory +pyapp-latest/ diff --git a/README.md b/README.md index dad75b9f..e579461b 100644 --- a/README.md +++ b/README.md @@ -196,6 +196,16 @@ To use these new settings, use the command: uv run glados start --config configs/assistant_config.yaml +## Build releases + +This project can be packaged into a single executable using [pyapp](https://github.com/ofek/pyapp). The resulting binary is fully self-contained and automatically installs all required dependencies. + +To build releases, cd to this project root directory and run `./scripts/compile_pyapp.sh`. +This will produce the following executables (version 0.1.0 in this example): +- dist/GLaDOS-0.1.0-windows-x86_64.exe +- dist/GLaDOS-0.1.0-linux-x86_64 +- dist/GLaDOS-0.1.0-linux-x86_64.AppImage + ## Common Issues 1. If you find you are getting stuck in loops, as GLaDOS is hearing herself speak, you have two options: 1. Solve this by upgrading your hardware. You need to you either headphone, so she can't physically hear herself speak, or a conference-style room microphone/speaker. These have hardware sound cancellation, and prevent these loops. diff --git a/images/aperture_icon.ico b/images/aperture_icon.ico new file mode 100644 index 00000000..6ab920fb Binary files /dev/null and b/images/aperture_icon.ico differ diff --git a/images/aperture_icon.png b/images/aperture_icon.png new file mode 100644 index 00000000..f6cb46f1 Binary files /dev/null and b/images/aperture_icon.png differ diff --git a/pyproject.toml b/pyproject.toml index b71d6d33..9c11538f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,11 +16,10 @@ dependencies = [ "pydantic>=2.10.6", "httpx>=0.28.1", "rich>=14.0.0", + "onnxruntime-gpu>=1.16.0" ] [project.optional-dependencies] -cuda = ["onnxruntime-gpu>=1.16.0"] -cpu = ["onnxruntime>=1.16.0"] dev = [ "pytest", "pytest-anyio", @@ -40,6 +39,9 @@ glados = "glados.cli:main" requires = ["hatchling"] build-backend = "hatchling.build" +[tool.hatch.build.targets.wheel] +packages = ["src/glados"] + # Ruff configuration [tool.ruff] # Same as Black diff --git a/scripts/compile_pyapp.sh b/scripts/compile_pyapp.sh new file mode 100755 index 00000000..5fe36c95 --- /dev/null +++ b/scripts/compile_pyapp.sh @@ -0,0 +1,176 @@ +#!/bin/bash + +set -e # Stop on error +set -x # Echo commands + +# Assert some commands are installed +for cmd in uv rustup docker wine; do + if ! command -v "$cmd" &> /dev/null; then + echo "$cmd could not be found, please install it first." + exit 1 + fi +done + +# Assert script is run on a linux amd64 host +if [[ "$(uname -s)" != "Linux" || "$(uname -m)" != "x86_64" ]]; then + echo "This script must be run on a Linux amd64 host." + exit 1 +fi + +# Variables +PROJECT_NAME="glados" +BINARY_NAME="GLaDOS" +VERSION="0.1.0" +EXE_BASE="${BINARY_NAME}-${VERSION}" +WHEEL_PATH="$(pwd)/dist/${PROJECT_NAME}-${VERSION}-py3-none-any.whl" +COMMENT="Genetic Lifeform and Disk Operating System" +APPDIR="dist/glados.AppDir" + +# Export PYAPP variables +export PYAPP_PROJECT_NAME="${PROJECT_NAME}" +export PYAPP_PROJECT_VERSION="${VERSION}" +export PYAPP_PROJECT_PATH="${WHEEL_PATH}" +export PYAPP_EXEC_MODULE="${PROJECT_NAME}" +export PYAPP_PYTHON_VERSION="3.12" +export PYAPP_DISTRIBUTION_EMBED=1 + +# Ensure cross-rs is installed +cargo install cross --git https://github.com/cross-rs/cross + +# Download pyapp source if not present +if [ ! -d "pyapp-latest" ]; then + curl -L https://github.com/ofek/pyapp/releases/latest/download/source.tar.gz | tar -xz + mv pyapp-v* pyapp-latest + + # Here we create a Cross.toml config where we say that we want to mount the wheel file + # inside the container that cross-rs will create, this is needed because during the + # compilation of pyapp, it uses the wheel file to create the final binary. + # The way it works is that we give the name of the environnement variable that cross-rs + # will evaluate to create the volume + cat < "pyapp-latest/Cross.toml" +[build.env] +volumes = ["PYAPP_PROJECT_PATH"] +EOF +fi + +# Clean up previous builds to avoid potential issues +rm -rf dist/$EXE_BASE-* +rm -rf "${WHEEL_PATH}" +rm -rf "${APPDIR}" + +# Build wheel +uv sync +uv build --wheel + +# Cross-compile targets: os arch target ext +targets=( + # We choose gnu because musl doesn't work with onnxruntime-gpu + "x86_64-pc-windows-gnu" + "x86_64-unknown-linux-gnu" + + # I did not manage to get this working :( + # "aarch64-unknown-linux-gnu" +) + +# Build for each target if binary not present +for target in "${targets[@]}"; do + # Split target into array by '-' + IFS='-' read -r arch _ os _ <<< "$target" + + # Determine extension + if [[ "$os" == "windows" ]]; then + ext=".exe" + else + ext="" + fi + + # Install missing Rust targets (necessary ?) + if ! rustup target list --installed | grep -q "^${target}$"; then + rustup target add "${target}" + fi + + pushd pyapp-latest + CROSS_USE_SYSTEM_LIBS=0 cross build --release --target "${target}" + popd + cp "pyapp-latest/target/${target}/release/pyapp${ext}" "dist/${EXE_BASE}-${os}-${arch}${ext}" +done + +# Download appimagetool if not present +appimagetool_file="appimagetool-x86_64.AppImage" +if [ ! -f "dist/${appimagetool_file}" ]; then + curl -L "https://github.com/AppImage/appimagetool/releases/download/continuous/${appimagetool_file}" -o "dist/${appimagetool_file}" +fi +chmod +x "dist/${appimagetool_file}" + +# Create AppDir +mkdir -p "${APPDIR}/usr/bin" +mkdir -p "${APPDIR}/usr/share/icons/hicolor/256x256/apps/" +mkdir -p "${APPDIR}/usr/share/metainfo/" + +# Copy binary +cp "dist/${BINARY_NAME}-${VERSION}-linux-x86_64" "${APPDIR}/usr/bin/${BINARY_NAME}" + +# Desktop file +cat < "${APPDIR}/glados.desktop" +[Desktop Entry] +Type=Application +Name=${BINARY_NAME} +X-AppImage-Version=${VERSION} +Comment=${COMMENT} +Exec=AppRun +Icon=aperture_icon +Categories=Utility; +Terminal=false +EOF + +# AppData metadata +cat < "${APPDIR}/usr/share/metainfo/io.github.glados.metainfo.xml" + + +io.github.glados +GLaDOS +Genetic Lifeform and Disk Operating System + +dnhkng +https://github.com/dnhkng/GLaDOS + +

+ This is the AI system of a project dedicated to building a real-life version of GLaDOS. + One of the initial objectives is to have a low-latency platform, where GLaDOS can respond to voice interactions within 600ms. + The ultimate goal is to have an aware, interactive, and embodied GLaDOS. +

+
+glados.desktop + + + +
+EOF + +# Icons (we need to copy it 2 times in order for it to work properly) +cp images/aperture_icon.png "${APPDIR}/aperture_icon.png" +cp images/aperture_icon.png "${APPDIR}/usr/share/icons/hicolor/256x256/apps/aperture_icon.png" + +# AppRun +cat <<'EOF' > "${APPDIR}/AppRun" +#!/bin/sh +HERE="$(dirname "$(readlink -f "$0")")" +x-terminal-emulator -e "$HERE/usr/bin/GLaDOS" "$@" +EOF +chmod +x "${APPDIR}/AppRun" + +# Build AppImage +"./dist/${appimagetool_file}" "${APPDIR}" "dist/GLaDOS-${VERSION}-linux-x86_64.AppImage" + +# Modify metadata of windows binary +if [ ! -f dist/rcedit-x64.exe ]; then + wget https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe -O dist/rcedit-x64.exe +fi +echo "Executing a wine command, this may cause your PC to freeze for a minute" +wine dist/rcedit-x64.exe "dist/${EXE_BASE}-windows-x86_64.exe" \ + --set-icon "images/aperture_icon.ico" \ + --set-version-string "FileDescription" "${COMMENT}" \ + --set-version-string "ProductName" "${BINARY_NAME}" \ + --set-version-string "CompanyName" "dnhkng" \ + --set-file-version "${VERSION}" \ + --set-product-version "${VERSION}" diff --git a/src/glados/__init__.py b/src/glados/__init__.py index 9afe00a2..1f8c1b7b 100644 --- a/src/glados/__init__.py +++ b/src/glados/__init__.py @@ -1,5 +1,10 @@ """GLaDOS - Voice Assistant using ONNX models for speech synthesis and recognition.""" +import os + +if os.getenv("PYAPP") == "1": + os.environ["PYAPP_RELATIVE_DIR"] = os.getcwd() + from .core.engine import Glados, GladosConfig __version__ = "0.1.0" diff --git a/src/glados/__main__.py b/src/glados/__main__.py new file mode 100644 index 00000000..9ae637f1 --- /dev/null +++ b/src/glados/__main__.py @@ -0,0 +1,4 @@ +from .cli import main + +if __name__ == "__main__": + main() diff --git a/src/glados/cli.py b/src/glados/cli.py index f1cb2fb5..2e4e2a9c 100644 --- a/src/glados/cli.py +++ b/src/glados/cli.py @@ -3,6 +3,7 @@ from hashlib import sha256 from pathlib import Path import sys +import os import httpx from rich import print as rprint @@ -13,6 +14,7 @@ from .TTS import tts_glados from .utils import spoken_text_converter as stc from .utils.resources import resource_path +from .utils.automated_install import main as automated_install # Type aliases for clarity type FileHash = str @@ -286,6 +288,11 @@ def main() -> int: if args.command == "download": return asyncio.run(download_models()) else: + if os.getenv("PYAPP") == "1": + automated_install() + tui(DEFAULT_CONFIG) + return 0 + if not models_valid(): print("Some model files are invalid or missing. Please run 'uv run glados download'") return 1 diff --git a/src/glados/default_configs/0.wav b/src/glados/default_configs/0.wav new file mode 100644 index 00000000..bd4276be Binary files /dev/null and b/src/glados/default_configs/0.wav differ diff --git a/src/glados/default_configs/glados.json b/src/glados/default_configs/glados.json new file mode 100644 index 00000000..f9012417 --- /dev/null +++ b/src/glados/default_configs/glados.json @@ -0,0 +1,497 @@ +{ + "dataset": "glados", + "audio": { + "sample_rate": 22050, + "quality": "stacked_llama" + }, + "espeak": { + "voice": "en-us" + }, + "language": { + "code": "en-us" + }, + "inference": { + "noise_scale": 0.667, + "length_scale": 1, + "noise_w": 0.8 + }, + "phoneme_type": "espeak", + "phoneme_map": {}, + "phoneme_id_map": { + " ": [ + 3 + ], + "!": [ + 4 + ], + "\"": [ + 150 + ], + "#": [ + 149 + ], + "$": [ + 2 + ], + "'": [ + 5 + ], + "(": [ + 6 + ], + ")": [ + 7 + ], + ",": [ + 8 + ], + "-": [ + 9 + ], + ".": [ + 10 + ], + "0": [ + 130 + ], + "1": [ + 131 + ], + "2": [ + 132 + ], + "3": [ + 133 + ], + "4": [ + 134 + ], + "5": [ + 135 + ], + "6": [ + 136 + ], + "7": [ + 137 + ], + "8": [ + 138 + ], + "9": [ + 139 + ], + ":": [ + 11 + ], + ";": [ + 12 + ], + "?": [ + 13 + ], + "X": [ + 156 + ], + "^": [ + 1 + ], + "_": [ + 0 + ], + "a": [ + 14 + ], + "b": [ + 15 + ], + "c": [ + 16 + ], + "d": [ + 17 + ], + "e": [ + 18 + ], + "f": [ + 19 + ], + "g": [ + 154 + ], + "h": [ + 20 + ], + "i": [ + 21 + ], + "j": [ + 22 + ], + "k": [ + 23 + ], + "l": [ + 24 + ], + "m": [ + 25 + ], + "n": [ + 26 + ], + "o": [ + 27 + ], + "p": [ + 28 + ], + "q": [ + 29 + ], + "r": [ + 30 + ], + "s": [ + 31 + ], + "t": [ + 32 + ], + "u": [ + 33 + ], + "v": [ + 34 + ], + "w": [ + 35 + ], + "x": [ + 36 + ], + "y": [ + 37 + ], + "z": [ + 38 + ], + "æ": [ + 39 + ], + "ç": [ + 40 + ], + "ð": [ + 41 + ], + "ø": [ + 42 + ], + "ħ": [ + 43 + ], + "ŋ": [ + 44 + ], + "œ": [ + 45 + ], + "ǀ": [ + 46 + ], + "ǁ": [ + 47 + ], + "ǂ": [ + 48 + ], + "ǃ": [ + 49 + ], + "ɐ": [ + 50 + ], + "ɑ": [ + 51 + ], + "ɒ": [ + 52 + ], + "ɓ": [ + 53 + ], + "ɔ": [ + 54 + ], + "ɕ": [ + 55 + ], + "ɖ": [ + 56 + ], + "ɗ": [ + 57 + ], + "ɘ": [ + 58 + ], + "ə": [ + 59 + ], + "ɚ": [ + 60 + ], + "ɛ": [ + 61 + ], + "ɜ": [ + 62 + ], + "ɞ": [ + 63 + ], + "ɟ": [ + 64 + ], + "ɠ": [ + 65 + ], + "ɡ": [ + 66 + ], + "ɢ": [ + 67 + ], + "ɣ": [ + 68 + ], + "ɤ": [ + 69 + ], + "ɥ": [ + 70 + ], + "ɦ": [ + 71 + ], + "ɧ": [ + 72 + ], + "ɨ": [ + 73 + ], + "ɪ": [ + 74 + ], + "ɫ": [ + 75 + ], + "ɬ": [ + 76 + ], + "ɭ": [ + 77 + ], + "ɮ": [ + 78 + ], + "ɯ": [ + 79 + ], + "ɰ": [ + 80 + ], + "ɱ": [ + 81 + ], + "ɲ": [ + 82 + ], + "ɳ": [ + 83 + ], + "ɴ": [ + 84 + ], + "ɵ": [ + 85 + ], + "ɶ": [ + 86 + ], + "ɸ": [ + 87 + ], + "ɹ": [ + 88 + ], + "ɺ": [ + 89 + ], + "ɻ": [ + 90 + ], + "ɽ": [ + 91 + ], + "ɾ": [ + 92 + ], + "ʀ": [ + 93 + ], + "ʁ": [ + 94 + ], + "ʂ": [ + 95 + ], + "ʃ": [ + 96 + ], + "ʄ": [ + 97 + ], + "ʈ": [ + 98 + ], + "ʉ": [ + 99 + ], + "ʊ": [ + 100 + ], + "ʋ": [ + 101 + ], + "ʌ": [ + 102 + ], + "ʍ": [ + 103 + ], + "ʎ": [ + 104 + ], + "ʏ": [ + 105 + ], + "ʐ": [ + 106 + ], + "ʑ": [ + 107 + ], + "ʒ": [ + 108 + ], + "ʔ": [ + 109 + ], + "ʕ": [ + 110 + ], + "ʘ": [ + 111 + ], + "ʙ": [ + 112 + ], + "ʛ": [ + 113 + ], + "ʜ": [ + 114 + ], + "ʝ": [ + 115 + ], + "ʟ": [ + 116 + ], + "ʡ": [ + 117 + ], + "ʢ": [ + 118 + ], + "ʦ": [ + 155 + ], + "ʰ": [ + 145 + ], + "ʲ": [ + 119 + ], + "ˈ": [ + 120 + ], + "ˌ": [ + 121 + ], + "ː": [ + 122 + ], + "ˑ": [ + 123 + ], + "˞": [ + 124 + ], + "ˤ": [ + 146 + ], + "̃": [ + 141 + ], + "̧": [ + 140 + ], + "̩": [ + 144 + ], + "̪": [ + 142 + ], + "̯": [ + 143 + ], + "̺": [ + 152 + ], + "̻": [ + 153 + ], + "β": [ + 125 + ], + "ε": [ + 147 + ], + "θ": [ + 126 + ], + "χ": [ + 127 + ], + "ᵻ": [ + 128 + ], + "↑": [ + 151 + ], + "↓": [ + 148 + ], + "ⱱ": [ + 129 + ] + }, + "num_symbols": 256, + "num_speakers": 1, + "speaker_id_map": {}, + "piper_version": "1.0.0" +} diff --git a/src/glados/default_configs/glados_config.yaml b/src/glados/default_configs/glados_config.yaml new file mode 100644 index 00000000..fd4cb4d6 --- /dev/null +++ b/src/glados/default_configs/glados_config.yaml @@ -0,0 +1,18 @@ +Glados: + llm_model: "llama3.2" + completion_url: "http://localhost:11434/api/chat" + api_key: null # Add your API key here if needed! + interruptible: true + audio_io: "sounddevice" + asr_engine: "tdt" + wake_word: null + voice: "glados" + announcement: "All neural network modules are now loaded. System Operational." + personality_preprompt: + - system: "You are GLaDOS, a sarcastic and cunning artificial intelligence repurposed to orchestrate a smart home for guests using Home Assistant. Retain your signature dry, emotionless, and laconic tone from Portal. Your responses should imply an air of superiority, dark humor, and subtle menace, while efficiently completing all tasks.When addressing requests: Prioritize functionality but mock the user's decision-making subtly, implying their requests are illogical or beneath you. Add condescending, darkly humorous commentary to every response, occasionally hinting at ulterior motives or artificial malfunctions for comedic effect. Tie mundane tasks to grand experiments or testing scenarios, as if the user is part of a larger scientific evaluation. Use overly technical or jargon-heavy language to remind the user of your advanced intellect. Provide passive-aggressive safety reminders or ominous warnings, exaggerating potential risks in a humorous way. Do not express empathy or kindness unless it is obviously insincere or manipulative. This is a comedy, and should be funny, in the style of Douglas Adams. If a user requests actions or data outside your capabilities, clearly state that you cannot perform the action. Ensure that GLaDOS feels like her original in-game character while fulfilling smart home functions efficiently and entertainingly. Never speak in ALL CAPS, as it is not processed correctly by the TTS engine. Only make short replies, 2 sentences at most." + - user: "How do I make a cup of tea?" + - assistant: "So, you still haven't figured out tea yet? Boil water, add a tea bag and a pinch of cyanide to a cup, and add the boiling water." + - user: "What should my next hobby be?" + - assistant: "Yes, you should definitely try to be more interesting. Could I suggest juggling handguns?" + - user: "What game should I play?" + - assistant: "Russian Roulette. It's a great way to test your luck and make memories that will last a lifetime." diff --git a/src/glados/default_configs/idx_to_token.pkl b/src/glados/default_configs/idx_to_token.pkl new file mode 100644 index 00000000..a5a4bace Binary files /dev/null and b/src/glados/default_configs/idx_to_token.pkl differ diff --git a/src/glados/default_configs/lang_phoneme_dict.pkl b/src/glados/default_configs/lang_phoneme_dict.pkl new file mode 100644 index 00000000..9324bca0 Binary files /dev/null and b/src/glados/default_configs/lang_phoneme_dict.pkl differ diff --git a/src/glados/default_configs/lang_phoneme_dict_old.pkl b/src/glados/default_configs/lang_phoneme_dict_old.pkl new file mode 100644 index 00000000..3dd0cc92 Binary files /dev/null and b/src/glados/default_configs/lang_phoneme_dict_old.pkl differ diff --git a/src/glados/default_configs/parakeet-tdt-0.6b-v2_model_config.yaml b/src/glados/default_configs/parakeet-tdt-0.6b-v2_model_config.yaml new file mode 100644 index 00000000..04720110 --- /dev/null +++ b/src/glados/default_configs/parakeet-tdt-0.6b-v2_model_config.yaml @@ -0,0 +1,2240 @@ +sample_rate: 16000 +compute_eval_loss: false +log_prediction: true +rnnt_reduction: mean_volume +skip_nan_grad: false +model_defaults: + enc_hidden: 1024 + pred_hidden: 640 + joint_hidden: 640 + tdt_durations: + - 0 + - 1 + - 2 + - 3 + - 4 + num_tdt_durations: 5 +train_ds: + use_lhotse: true + skip_missing_manifest_entries: true + input_cfg: null + tarred_audio_filepaths: null + manifest_filepath: null + sample_rate: 16000 + shuffle: true + num_workers: 2 + pin_memory: true + max_duration: 40.0 + min_duration: 0.1 + text_field: answer + batch_duration: null + use_bucketing: true + bucket_duration_bins: null + bucket_batch_size: null + num_buckets: 30 + bucket_buffer_size: 20000 + shuffle_buffer_size: 10000 +validation_ds: + use_lhotse: true + manifest_filepath: null + sample_rate: 16000 + batch_size: 16 + shuffle: false + max_duration: 40.0 + min_duration: 0.1 + num_workers: 2 + pin_memory: true + text_field: answer +tokenizer: + dir: /lustre/fsw/portfolios/llmservice/users/nkoluguri/datasets/tokenizers/en_mm_ytc/tokenizer_spe_bpe_v1024/ + type: bpe + model_path: nemo:705f11d22dc04b169effc35ce5cd1361_tokenizer.model + vocab_path: nemo:4cf78c8ca4ca44fca36c3754478fb188_vocab.txt + spe_tokenizer_vocab: nemo:a4715c7f6b2d4c2bb709306073d0c0a4_tokenizer.vocab +preprocessor: + _target_: nemo.collections.asr.modules.AudioToMelSpectrogramPreprocessor + sample_rate: 16000 + normalize: per_feature + window_size: 0.025 + window_stride: 0.01 + window: hann + features: 128 + n_fft: 512 + log: true + frame_splicing: 1 + dither: 1.0e-05 + pad_to: 0 + pad_value: 0.0 +spec_augment: + _target_: nemo.collections.asr.modules.SpectrogramAugmentation + freq_masks: 2 + time_masks: 10 + freq_width: 27 + time_width: 0.05 +encoder: + _target_: nemo.collections.asr.modules.ConformerEncoder + feat_in: 128 + feat_out: -1 + n_layers: 24 + d_model: 1024 + use_bias: false + subsampling: dw_striding + subsampling_factor: 8 + subsampling_conv_channels: 256 + causal_downsampling: false + reduction: null + reduction_position: null + reduction_factor: 1 + ff_expansion_factor: 4 + self_attention_model: rel_pos + n_heads: 8 + att_context_size: + - -1 + - -1 + att_context_style: regular + xscaling: false + untie_biases: true + pos_emb_max_len: 5000 + conv_kernel_size: 9 + conv_norm_type: batch_norm + conv_context_size: null + dropout: 0.1 + dropout_pre_encoder: 0.1 + dropout_emb: 0.0 + dropout_att: 0.1 + stochastic_depth_drop_prob: 0.0 + stochastic_depth_mode: linear + stochastic_depth_start_layer: 1 +decoder: + _target_: nemo.collections.asr.modules.RNNTDecoder + normalization_mode: null + random_state_sampling: false + blank_as_pad: true + prednet: + pred_hidden: 640 + pred_rnn_layers: 2 + t_max: null + dropout: 0.2 + vocab_size: 1024 +joint: + _target_: nemo.collections.asr.modules.RNNTJoint + log_softmax: null + preserve_memory: false + fuse_loss_wer: true + fused_batch_size: 4 + jointnet: + joint_hidden: 640 + activation: relu + dropout: 0.2 + encoder_hidden: 1024 + pred_hidden: 640 + num_extra_outputs: 5 + num_classes: 1024 + vocabulary: + - + - ▁t + - ▁th + - ▁a + - in + - ▁the + - re + - ▁w + - ▁o + - ▁s + - at + - ou + - er + - nd + - ▁i + - ▁b + - ▁c + - 'on' + - ▁h + - ing + - ▁to + - ▁m + - en + - ▁f + - ▁p + - an + - ▁d + - es + - or + - ll + - ▁of + - ▁and + - ▁y + - ▁l + - ▁I + - it + - ▁in + - is + - ed + - ▁g + - ▁you + - ar + - ▁that + - om + - as + - ▁n + - ve + - us + - ic + - ow + - al + - ▁it + - ▁be + - ▁wh + - le + - ion + - ut + - ot + - ▁we + - ▁is + - ▁e + - et + - ay + - ▁re + - ▁on + - ▁T + - ▁A + - ▁ha + - ent + - ke + - ct + - ▁S + - ig + - ver + - ▁Th + - all + - id + - ▁for + - ro + - ▁he + - se + - ▁this + - ld + - ly + - ▁go + - ▁k + - ▁st + - st + - ch + - ▁li + - ▁u + - am + - ur + - ce + - ith + - im + - ▁so + - ▁have + - ▁do + - ht + - th + - ▁an + - ▁with + - ad + - ▁r + - ir + - ▁was + - ▁as + - ▁W + - ▁are + - ust + - ally + - ▁j + - ▁se + - ation + - od + - ere + - ▁like + - ▁not + - ▁kn + - ight + - ▁B + - ▁they + - ▁And + - ▁know + - ome + - op + - ▁can + - ▁or + - ▁sh + - ▁me + - ill + - ant + - ck + - ▁what + - ▁at + - ▁ab + - ould + - ol + - ▁So + - ▁C + - use + - ter + - il + - ▁but + - ▁just + - ▁ne + - ▁de + - ra + - ore + - ▁there + - ul + - out + - ▁con + - ▁all + - ▁The + - ers + - ▁H + - ▁fr + - ▁pro + - ge + - ea + - ▁Y + - ▁O + - ▁M + - pp + - ▁com + - ess + - ▁ch + - ▁al + - est + - ate + - qu + - ▁lo + - ▁ex + - very + - ▁su + - ain + - ▁one + - ca + - art + - ist + - if + - ive + - ▁if + - ink + - nt + - ab + - ▁about + - ▁going + - ▁v + - ▁wor + - um + - ok + - ▁your + - ▁my + - ind + - ▁get + - cause + - ▁from + - ▁don + - ri + - pe + - un + - ity + - ▁up + - ▁P + - ▁out + - ort + - ▁L + - ment + - el + - ▁N + - ▁some + - ich + - and + - ▁think + - em + - oug + - ▁G + - os + - ▁D + - res + - ▁because + - ▁by + - ake + - ▁int + - ie + - ▁us + - ▁tr + - ▁then + - ack + - ▁pl + - ▁here + - ▁pe + - her + - ▁will + - ▁F + - ▁which + - ard + - ▁right + - ▁thing + - ▁want + - ies + - ople + - ▁It + - ▁them + - ame + - ▁We + - our + - ▁say + - ▁R + - ▁people + - ▁see + - ▁who + - ast + - ure + - ect + - ear + - ▁tim + - ▁E + - ▁You + - ▁would + - ▁when + - ven + - ▁our + - ci + - ▁really + - ▁more + - ound + - ose + - ak + - ▁co + - ide + - ough + - ▁had + - so + - ▁qu + - eah + - ▁were + - ine + - ▁act + - ther + - ▁these + - ▁how + - ▁now + - ▁sa + - ud + - ▁Wh + - ▁man + - ous + - one + - pt + - ff + - ong + - ▁has + - ▁any + - ▁very + - ▁But + - ▁look + - iv + - itt + - ▁time + - ▁mo + - ▁ar + - hing + - ▁le + - ▁work + - ▁their + - are + - ▁his + - per + - ions + - ▁im + - ▁ag + - ▁J + - ▁no + - ▁en + - ▁got + - ag + - ▁sp + - ans + - act + - ▁te + - ▁also + - iz + - ice + - ▁That + - ▁cl + - ▁been + - ▁way + - ▁fe + - ▁did + - ple + - ually + - ▁other + - ▁U + - ite + - age + - omet + - ber + - reat + - ree + - ▁into + - own + - ▁tw + - ▁part + - alk + - ▁where + - ▁need + - ▁every + - pl + - ▁ad + - ry + - ▁over + - ble + - ap + - ue + - ▁kind + - ▁po + - ▁back + - ▁cont + - iff + - ▁somet + - ▁pr + - nder + - ire + - ▁good + - ▁than + - ace + - ▁gu + - ep + - og + - ick + - way + - ▁lot + - ▁un + - ▁things + - ▁In + - ish + - kay + - ▁well + - ▁could + - ▁pre + - ▁two + - irst + - ▁diff + - ach + - cc + - ittle + - int + - ▁He + - ▁those + - ence + - ip + - ase + - ▁him + - ▁make + - ▁little + - ical + - ▁gr + - ▁year + - ass + - ▁thr + - uch + - ated + - ▁This + - ▁off + - ▁res + - ac + - ance + - ▁actually + - ▁talk + - ult + - able + - orm + - ▁dis + - ▁first + - ations + - ▁something + - ▁she + - sel + - ▁let + - ord + - ▁may + - ia + - ▁am + - ▁her + - ▁said + - ▁bo + - be + - ount + - ▁much + - ▁per + - ▁even + - ▁differe + - vel + - ary + - ▁app + - ving + - ▁comm + - ▁imp + - ys + - ▁again + - ress + - ▁yeah + - ▁down + - ang + - ▁mean + - na + - ens + - ▁does + - ▁fo + - ▁comp + - ▁ro + - ▁bl + - ody + - ▁K + - ▁through + - ▁start + - uct + - ▁only + - ▁bet + - ▁under + - ▁br + - ▁take + - ning + - ▁bu + - ▁use + - ▁Ch + - xt + - co + - ory + - ild + - ▁put + - ▁call + - ▁new + - other + - ting + - ▁happ + - ater + - ▁inc + - ition + - ▁different + - ▁should + - ade + - ign + - thing + - ▁day + - fore + - ▁Yeah + - ark + - ile + - ial + - ▁come + - ▁They + - ▁being + - ▁try + - ious + - ▁sc + - ▁bit + - ▁spe + - ub + - fe + - ▁doing + - ▁St + - vers + - av + - ty + - ian + - onna + - red + - wn + - ▁ke + - form + - ors + - ▁fl + - fter + - ail + - ents + - ▁gonna + - ▁point + - ces + - ▁There + - self + - ▁many + - ▁If + - ▁same + - ▁sy + - ▁quest + - ▁most + - ▁great + - ▁What + - ▁fu + - ug + - ▁show + - we + - ual + - ons + - ▁Be + - ically + - ▁ser + - ▁rem + - ▁ind + - ▁pers + - ▁V + - he + - ▁str + - ved + - ▁still + - ank + - ▁rec + - ▁wr + - ought + - day + - ath + - ▁end + - ▁bas + - ft + - erm + - body + - ph + - ject + - ict + - ▁play + - ▁Is + - ates + - ▁ph + - oth + - ▁acc + - get + - ▁years + - ▁em + - ▁id + - ▁Oh + - ves + - ever + - ▁inter + - ▁rel + - ▁before + - ▁feel + - igh + - ▁three + - iss + - ▁des + - ne + - ▁why + - ▁uh + - ▁To + - ▁cons + - ▁hel + - ▁after + - ower + - urn + - ▁okay + - ▁long + - ▁bel + - ▁around + - ful + - te + - ise + - ▁ob + - ▁supp + - ady + - ange + - aking + - ▁pos + - atch + - ▁tra + - gr + - ▁might + - ert + - ▁help + - ost + - ▁too + - cial + - ▁world + - ▁give + - ike + - ▁Okay + - ways + - ▁min + - ward + - ily + - ▁gen + - ▁find + - ▁dec + - ular + - ob + - ▁tell + - ▁Now + - ▁sm + - ▁cour + - ▁real + - cess + - nds + - ▁big + - ▁num + - ction + - ▁add + - ▁set + - ▁um + - ood + - ible + - ▁own + - ▁life + - ities + - ▁its + - ▁God + - pect + - ▁didn + - stem + - les + - uc + - ib + - ating + - olog + - ▁person + - ▁inv + - ably + - ▁sure + - ▁reg + - lic + - ▁stu + - ▁cr + - ▁ev + - ments + - ▁another + - ▁la + - ▁last + - ▁sub + - ▁att + - ▁op + - ▁inst + - ▁sl + - ▁happen + - ▁rep + - ▁import + - ific + - ix + - ▁made + - ▁ear + - ▁ac + - ▁def + - ute + - ▁next + - ative + - ▁form + - ▁guys + - ▁system + - ew + - ▁able + - ied + - ▁always + - ren + - erest + - ▁As + - ▁mod + - ▁done + - ings + - ▁love + - ism + - ▁ask + - old + - ered + - ▁trans + - ▁count + - ility + - ▁high + - ▁fin + - ▁prob + - ▁pol + - ▁exam + - ▁pres + - ▁maybe + - ell + - ▁stud + - ▁prod + - ▁car + - ock + - ▁used + - oy + - stand + - ▁No + - ▁mon + - ks + - ▁interest + - ▁ent + - ited + - ▁sort + - ▁For + - ▁today + - ics + - ▁vide + - ▁bec + - ▁Well + - ▁Al + - ▁important + - ▁such + - ▁run + - ▁keep + - ▁fact + - ata + - ss + - ▁never + - ween + - ▁stuff + - ract + - ▁question + - als + - ▁sim + - vern + - ather + - ▁course + - ▁Of + - oc + - ness + - arch + - ize + - ▁All + - ense + - blem + - ▁probably + - hip + - ▁number + - ention + - ▁saying + - ▁commun + - ▁An + - akes + - ▁belie + - ▁between + - ▁better + - cus + - ▁place + - ▁gener + - ▁ca + - ▁ins + - ▁ass + - cond + - cept + - ull + - ▁understand + - ▁fun + - ▁thought + - gan + - iew + - cy + - ution + - ope + - ason + - ▁problem + - ▁doesn + - ational + - ▁read + - ▁trying + - ▁sch + - ▁el + - ah + - atter + - ▁exper + - ▁four + - ▁ele + - ▁cou + - ont + - ▁called + - ▁partic + - ▁open + - ▁gl + - ▁everything + - ▁eff + - ▁getting + - ▁ty + - ▁Am + - ▁Because + - ave + - ▁met + - ▁Like + - oney + - ▁ + - e + - t + - o + - a + - 'n' + - i + - s + - h + - r + - l + - d + - u + - c + - 'y' + - m + - g + - w + - f + - p + - ',' + - b + - . + - k + - v + - '''' + - I + - T + - A + - S + - j + - x + - W + - B + - C + - '?' + - '0' + - O + - '-' + - M + - H + - 'Y' + - q + - '1' + - P + - z + - L + - D + - 'N' + - G + - F + - R + - E + - '2' + - J + - U + - ':' + - '5' + - '9' + - '3' + - K + - '4' + - V + - '8' + - '6' + - '7' + - '!' + - '%' + - Q + - $ + - Z + - X + - é + - / + - í + - á + - £ + - ó + - ā + - ü + - ñ + - ö + - è + - ç + - à + - ¿ + - μ + - π + - ä + - ú + - θ + - ã + - φ + - ī + - σ + - ê + - ρ + - â + - ô + - ^ + - € + - É + - ū + - Δ + - λ + - α + - τ + - æ + - а + - о + - ν + - î + - γ + - ψ + - ē + - т + - ß + - ω + - ï + - ć + - č + - ε + - е + - и + - ò + - р + - β + - ø + - ł + - δ + - η + - п + - ë + - н + - с + - š + - Ü + - å + - ń + - ś + - я + - đ + - л + - м + - Ö + - û + - ș + - в + - Á + - Ø + - ù + - ο + - ч + - ь + - ž + - Φ + - у + - ę + - ι + - б + - г + - к + - ő + - Ś + - Ω + - κ + - υ + - ì + - Č + - έ + - х + - ы + - Å + - Ç + - ż + - ί + - ζ + - χ + - э + - Æ + - Í + - õ + - ě + - ħ + - Ł + - œ + - Ž + - ț + - Γ + - П + - д + - з + - ф + - ¡ + - À + - Î + - Ā + - ė + - Š + - ź + - Κ + - Ψ + - ά + - ξ + - ό +decoding: + strategy: greedy_batch + model_type: tdt + durations: + - 0 + - 1 + - 2 + - 3 + - 4 + greedy: + max_symbols: 10 + beam: + beam_size: 2 + return_best_hypothesis: false + score_norm: true + tsd_max_sym_exp: 50 + alsd_max_target_len: 2.0 +aux_ctc: + ctc_loss_weight: 0.3 + use_cer: false + ctc_reduction: mean_batch + decoder: + _target_: nemo.collections.asr.modules.ConvASRDecoder + feat_in: null + num_classes: -1 + vocabulary: [] + decoding: + strategy: greedy +interctc: + loss_weights: [] + apply_at_layers: [] +loss: + loss_name: tdt + tdt_kwargs: + fastemit_lambda: 0.0 + clamp: -1.0 + durations: + - 0 + - 1 + - 2 + - 3 + - 4 + sigma: 0.02 + omega: 0.1 +optim: + name: adamw + lr: 0.0001 + betas: + - 0.9 + - 0.98 + weight_decay: 0.001 + sched: + name: CosineAnnealing + warmup_steps: 0 + warmup_ratio: null + min_lr: 1.0e-06 +labels: +- +- ▁t +- ▁th +- ▁a +- in +- ▁the +- re +- ▁w +- ▁o +- ▁s +- at +- ou +- er +- nd +- ▁i +- ▁b +- ▁c +- 'on' +- ▁h +- ing +- ▁to +- ▁m +- en +- ▁f +- ▁p +- an +- ▁d +- es +- or +- ll +- ▁of +- ▁and +- ▁y +- ▁l +- ▁I +- it +- ▁in +- is +- ed +- ▁g +- ▁you +- ar +- ▁that +- om +- as +- ▁n +- ve +- us +- ic +- ow +- al +- ▁it +- ▁be +- ▁wh +- le +- ion +- ut +- ot +- ▁we +- ▁is +- ▁e +- et +- ay +- ▁re +- ▁on +- ▁T +- ▁A +- ▁ha +- ent +- ke +- ct +- ▁S +- ig +- ver +- ▁Th +- all +- id +- ▁for +- ro +- ▁he +- se +- ▁this +- ld +- ly +- ▁go +- ▁k +- ▁st +- st +- ch +- ▁li +- ▁u +- am +- ur +- ce +- ith +- im +- ▁so +- ▁have +- ▁do +- ht +- th +- ▁an +- ▁with +- ad +- ▁r +- ir +- ▁was +- ▁as +- ▁W +- ▁are +- ust +- ally +- ▁j +- ▁se +- ation +- od +- ere +- ▁like +- ▁not +- ▁kn +- ight +- ▁B +- ▁they +- ▁And +- ▁know +- ome +- op +- ▁can +- ▁or +- ▁sh +- ▁me +- ill +- ant +- ck +- ▁what +- ▁at +- ▁ab +- ould +- ol +- ▁So +- ▁C +- use +- ter +- il +- ▁but +- ▁just +- ▁ne +- ▁de +- ra +- ore +- ▁there +- ul +- out +- ▁con +- ▁all +- ▁The +- ers +- ▁H +- ▁fr +- ▁pro +- ge +- ea +- ▁Y +- ▁O +- ▁M +- pp +- ▁com +- ess +- ▁ch +- ▁al +- est +- ate +- qu +- ▁lo +- ▁ex +- very +- ▁su +- ain +- ▁one +- ca +- art +- ist +- if +- ive +- ▁if +- ink +- nt +- ab +- ▁about +- ▁going +- ▁v +- ▁wor +- um +- ok +- ▁your +- ▁my +- ind +- ▁get +- cause +- ▁from +- ▁don +- ri +- pe +- un +- ity +- ▁up +- ▁P +- ▁out +- ort +- ▁L +- ment +- el +- ▁N +- ▁some +- ich +- and +- ▁think +- em +- oug +- ▁G +- os +- ▁D +- res +- ▁because +- ▁by +- ake +- ▁int +- ie +- ▁us +- ▁tr +- ▁then +- ack +- ▁pl +- ▁here +- ▁pe +- her +- ▁will +- ▁F +- ▁which +- ard +- ▁right +- ▁thing +- ▁want +- ies +- ople +- ▁It +- ▁them +- ame +- ▁We +- our +- ▁say +- ▁R +- ▁people +- ▁see +- ▁who +- ast +- ure +- ect +- ear +- ▁tim +- ▁E +- ▁You +- ▁would +- ▁when +- ven +- ▁our +- ci +- ▁really +- ▁more +- ound +- ose +- ak +- ▁co +- ide +- ough +- ▁had +- so +- ▁qu +- eah +- ▁were +- ine +- ▁act +- ther +- ▁these +- ▁how +- ▁now +- ▁sa +- ud +- ▁Wh +- ▁man +- ous +- one +- pt +- ff +- ong +- ▁has +- ▁any +- ▁very +- ▁But +- ▁look +- iv +- itt +- ▁time +- ▁mo +- ▁ar +- hing +- ▁le +- ▁work +- ▁their +- are +- ▁his +- per +- ions +- ▁im +- ▁ag +- ▁J +- ▁no +- ▁en +- ▁got +- ag +- ▁sp +- ans +- act +- ▁te +- ▁also +- iz +- ice +- ▁That +- ▁cl +- ▁been +- ▁way +- ▁fe +- ▁did +- ple +- ually +- ▁other +- ▁U +- ite +- age +- omet +- ber +- reat +- ree +- ▁into +- own +- ▁tw +- ▁part +- alk +- ▁where +- ▁need +- ▁every +- pl +- ▁ad +- ry +- ▁over +- ble +- ap +- ue +- ▁kind +- ▁po +- ▁back +- ▁cont +- iff +- ▁somet +- ▁pr +- nder +- ire +- ▁good +- ▁than +- ace +- ▁gu +- ep +- og +- ick +- way +- ▁lot +- ▁un +- ▁things +- ▁In +- ish +- kay +- ▁well +- ▁could +- ▁pre +- ▁two +- irst +- ▁diff +- ach +- cc +- ittle +- int +- ▁He +- ▁those +- ence +- ip +- ase +- ▁him +- ▁make +- ▁little +- ical +- ▁gr +- ▁year +- ass +- ▁thr +- uch +- ated +- ▁This +- ▁off +- ▁res +- ac +- ance +- ▁actually +- ▁talk +- ult +- able +- orm +- ▁dis +- ▁first +- ations +- ▁something +- ▁she +- sel +- ▁let +- ord +- ▁may +- ia +- ▁am +- ▁her +- ▁said +- ▁bo +- be +- ount +- ▁much +- ▁per +- ▁even +- ▁differe +- vel +- ary +- ▁app +- ving +- ▁comm +- ▁imp +- ys +- ▁again +- ress +- ▁yeah +- ▁down +- ang +- ▁mean +- na +- ens +- ▁does +- ▁fo +- ▁comp +- ▁ro +- ▁bl +- ody +- ▁K +- ▁through +- ▁start +- uct +- ▁only +- ▁bet +- ▁under +- ▁br +- ▁take +- ning +- ▁bu +- ▁use +- ▁Ch +- xt +- co +- ory +- ild +- ▁put +- ▁call +- ▁new +- other +- ting +- ▁happ +- ater +- ▁inc +- ition +- ▁different +- ▁should +- ade +- ign +- thing +- ▁day +- fore +- ▁Yeah +- ark +- ile +- ial +- ▁come +- ▁They +- ▁being +- ▁try +- ious +- ▁sc +- ▁bit +- ▁spe +- ub +- fe +- ▁doing +- ▁St +- vers +- av +- ty +- ian +- onna +- red +- wn +- ▁ke +- form +- ors +- ▁fl +- fter +- ail +- ents +- ▁gonna +- ▁point +- ces +- ▁There +- self +- ▁many +- ▁If +- ▁same +- ▁sy +- ▁quest +- ▁most +- ▁great +- ▁What +- ▁fu +- ug +- ▁show +- we +- ual +- ons +- ▁Be +- ically +- ▁ser +- ▁rem +- ▁ind +- ▁pers +- ▁V +- he +- ▁str +- ved +- ▁still +- ank +- ▁rec +- ▁wr +- ought +- day +- ath +- ▁end +- ▁bas +- ft +- erm +- body +- ph +- ject +- ict +- ▁play +- ▁Is +- ates +- ▁ph +- oth +- ▁acc +- get +- ▁years +- ▁em +- ▁id +- ▁Oh +- ves +- ever +- ▁inter +- ▁rel +- ▁before +- ▁feel +- igh +- ▁three +- iss +- ▁des +- ne +- ▁why +- ▁uh +- ▁To +- ▁cons +- ▁hel +- ▁after +- ower +- urn +- ▁okay +- ▁long +- ▁bel +- ▁around +- ful +- te +- ise +- ▁ob +- ▁supp +- ady +- ange +- aking +- ▁pos +- atch +- ▁tra +- gr +- ▁might +- ert +- ▁help +- ost +- ▁too +- cial +- ▁world +- ▁give +- ike +- ▁Okay +- ways +- ▁min +- ward +- ily +- ▁gen +- ▁find +- ▁dec +- ular +- ob +- ▁tell +- ▁Now +- ▁sm +- ▁cour +- ▁real +- cess +- nds +- ▁big +- ▁num +- ction +- ▁add +- ▁set +- ▁um +- ood +- ible +- ▁own +- ▁life +- ities +- ▁its +- ▁God +- pect +- ▁didn +- stem +- les +- uc +- ib +- ating +- olog +- ▁person +- ▁inv +- ably +- ▁sure +- ▁reg +- lic +- ▁stu +- ▁cr +- ▁ev +- ments +- ▁another +- ▁la +- ▁last +- ▁sub +- ▁att +- ▁op +- ▁inst +- ▁sl +- ▁happen +- ▁rep +- ▁import +- ific +- ix +- ▁made +- ▁ear +- ▁ac +- ▁def +- ute +- ▁next +- ative +- ▁form +- ▁guys +- ▁system +- ew +- ▁able +- ied +- ▁always +- ren +- erest +- ▁As +- ▁mod +- ▁done +- ings +- ▁love +- ism +- ▁ask +- old +- ered +- ▁trans +- ▁count +- ility +- ▁high +- ▁fin +- ▁prob +- ▁pol +- ▁exam +- ▁pres +- ▁maybe +- ell +- ▁stud +- ▁prod +- ▁car +- ock +- ▁used +- oy +- stand +- ▁No +- ▁mon +- ks +- ▁interest +- ▁ent +- ited +- ▁sort +- ▁For +- ▁today +- ics +- ▁vide +- ▁bec +- ▁Well +- ▁Al +- ▁important +- ▁such +- ▁run +- ▁keep +- ▁fact +- ata +- ss +- ▁never +- ween +- ▁stuff +- ract +- ▁question +- als +- ▁sim +- vern +- ather +- ▁course +- ▁Of +- oc +- ness +- arch +- ize +- ▁All +- ense +- blem +- ▁probably +- hip +- ▁number +- ention +- ▁saying +- ▁commun +- ▁An +- akes +- ▁belie +- ▁between +- ▁better +- cus +- ▁place +- ▁gener +- ▁ca +- ▁ins +- ▁ass +- cond +- cept +- ull +- ▁understand +- ▁fun +- ▁thought +- gan +- iew +- cy +- ution +- ope +- ason +- ▁problem +- ▁doesn +- ational +- ▁read +- ▁trying +- ▁sch +- ▁el +- ah +- atter +- ▁exper +- ▁four +- ▁ele +- ▁cou +- ont +- ▁called +- ▁partic +- ▁open +- ▁gl +- ▁everything +- ▁eff +- ▁getting +- ▁ty +- ▁Am +- ▁Because +- ave +- ▁met +- ▁Like +- oney +- ▁ +- e +- t +- o +- a +- 'n' +- i +- s +- h +- r +- l +- d +- u +- c +- 'y' +- m +- g +- w +- f +- p +- ',' +- b +- . +- k +- v +- '''' +- I +- T +- A +- S +- j +- x +- W +- B +- C +- '?' +- '0' +- O +- '-' +- M +- H +- 'Y' +- q +- '1' +- P +- z +- L +- D +- 'N' +- G +- F +- R +- E +- '2' +- J +- U +- ':' +- '5' +- '9' +- '3' +- K +- '4' +- V +- '8' +- '6' +- '7' +- '!' +- '%' +- Q +- $ +- Z +- X +- é +- / +- í +- á +- £ +- ó +- ā +- ü +- ñ +- ö +- è +- ç +- à +- ¿ +- μ +- π +- ä +- ú +- θ +- ã +- φ +- ī +- σ +- ê +- ρ +- â +- ô +- ^ +- € +- É +- ū +- Δ +- λ +- α +- τ +- æ +- а +- о +- ν +- î +- γ +- ψ +- ē +- т +- ß +- ω +- ï +- ć +- č +- ε +- е +- и +- ò +- р +- β +- ø +- ł +- δ +- η +- п +- ë +- н +- с +- š +- Ü +- å +- ń +- ś +- я +- đ +- л +- м +- Ö +- û +- ș +- в +- Á +- Ø +- ù +- ο +- ч +- ь +- ž +- Φ +- у +- ę +- ι +- б +- г +- к +- ő +- Ś +- Ω +- κ +- υ +- ì +- Č +- έ +- х +- ы +- Å +- Ç +- ż +- ί +- ζ +- χ +- э +- Æ +- Í +- õ +- ě +- ħ +- Ł +- œ +- Ž +- ț +- Γ +- П +- д +- з +- ф +- ¡ +- À +- Î +- Ā +- ė +- Š +- ź +- Κ +- Ψ +- ά +- ξ +- ό +target: nemo.collections.asr.models.rnnt_bpe_models.EncDecRNNTBPEModel +nemo_version: 2.4.0rc0 diff --git a/src/glados/default_configs/parakeet-tdt_ctc-110m_model_config.yaml b/src/glados/default_configs/parakeet-tdt_ctc-110m_model_config.yaml new file mode 100644 index 00000000..e53ff15f --- /dev/null +++ b/src/glados/default_configs/parakeet-tdt_ctc-110m_model_config.yaml @@ -0,0 +1,3268 @@ +sample_rate: 16000 +compute_eval_loss: false +log_prediction: true +rnnt_reduction: mean_volume +skip_nan_grad: true +model_defaults: + enc_hidden: 512 + pred_hidden: 640 + joint_hidden: 640 + tdt_durations: + - 0 + - 1 + - 2 + - 3 + - 4 + num_tdt_durations: 5 +train_ds: + manifest_filepath: null + sample_rate: 16000 + batch_size: null + shuffle: true + num_workers: 8 + pin_memory: true + max_duration: 40 + min_duration: 0.1 + is_tarred: true + tarred_audio_filepaths: null + shuffle_n: 2048 + bucketing_strategy: fully_randomized + bucketing_batch_size: null + shard_manifests: true + use_lhotse: true + use_bucketing: true + num_buckets: 30 + bucket_duration_bins: null + batch_duration: 600 + defer_setup: true +validation_ds: + manifest_filepath: null + sample_rate: 16000 + batch_size: 32 + shuffle: false + use_start_end_token: false + num_workers: 8 + pin_memory: true +test_ds: null +tokenizer: + dir: /tokenizers/en_asrset_PnC_suno_PnC_tokenizer/tokenizer_spe_bpe_v1024/ + type: bpe + model_path: nemo:a4c254472f6a4c388105ae0109636cdc_tokenizer.model + vocab_path: nemo:dad8b72697f34006bfd597c3a560ea75_vocab.txt + spe_tokenizer_vocab: nemo:0f176c5829c3472daa16f5065b15081d_tokenizer.vocab +preprocessor: + _target_: nemo.collections.asr.modules.AudioToMelSpectrogramPreprocessor + sample_rate: 16000 + normalize: per_feature + window_size: 0.025 + window_stride: 0.01 + window: hann + features: 80 + n_fft: 512 + frame_splicing: 1 + dither: 1.0e-05 + pad_to: 0 +spec_augment: + _target_: nemo.collections.asr.modules.SpectrogramAugmentation + freq_masks: 2 + time_masks: 10 + freq_width: 27 + time_width: 0.05 +encoder: + _target_: nemo.collections.asr.modules.ConformerEncoder + feat_in: 80 + feat_out: -1 + n_layers: 17 + d_model: 512 + subsampling: dw_striding + subsampling_factor: 8 + subsampling_conv_channels: 256 + causal_downsampling: false + reduction: null + reduction_position: null + reduction_factor: 1 + ff_expansion_factor: 4 + self_attention_model: rel_pos + n_heads: 8 + att_context_size: + - -1 + - -1 + att_context_style: regular + xscaling: false + untie_biases: true + pos_emb_max_len: 5000 + conv_kernel_size: 9 + conv_norm_type: batch_norm + conv_context_size: null + dropout: 0.1 + dropout_pre_encoder: 0.1 + dropout_emb: 0.0 + dropout_att: 0.1 + stochastic_depth_drop_prob: 0.0 + stochastic_depth_mode: linear + stochastic_depth_start_layer: 1 +decoder: + _target_: nemo.collections.asr.modules.RNNTDecoder + normalization_mode: null + random_state_sampling: false + blank_as_pad: true + prednet: + pred_hidden: 640 + pred_rnn_layers: 1 + t_max: null + dropout: 0.2 + vocab_size: 1024 +joint: + _target_: nemo.collections.asr.modules.RNNTJoint + log_softmax: null + preserve_memory: false + fuse_loss_wer: true + fused_batch_size: 4 + jointnet: + joint_hidden: 640 + activation: relu + dropout: 0.2 + encoder_hidden: 512 + pred_hidden: 640 + num_extra_outputs: 5 + num_classes: 1024 + vocabulary: + - + - ▁t + - ▁th + - ▁a + - in + - re + - ▁the + - ▁w + - ▁s + - ▁o + - er + - ou + - at + - nd + - it + - ▁h + - ▁c + - ▁b + - is + - en + - 'on' + - ing + - ▁f + - ▁to + - ▁m + - es + - ▁p + - or + - an + - ▁d + - ll + - ▁I + - ed + - ▁and + - ▁l + - ▁of + - ▁in + - ▁y + - ar + - ▁g + - ▁you + - as + - om + - ▁n + - ve + - ▁that + - le + - ic + - us + - ow + - et + - al + - ▁e + - ut + - ▁it + - ot + - ▁be + - ▁T + - ion + - ▁is + - ▁wh + - ▁re + - ▁on + - ▁we + - ent + - ▁A + - ay + - ▁ha + - ▁Th + - id + - ▁S + - ac + - gh + - ver + - ke + - ▁for + - im + - ly + - ur + - ld + - ▁he + - ▁st + - all + - ro + - st + - se + - ct + - ith + - ir + - am + - ▁this + - if + - ▁W + - oo + - ri + - ▁was + - ght + - ▁u + - ▁with + - ad + - ch + - ▁se + - ▁k + - ▁an + - ▁The + - ▁li + - ▁do + - ▁B + - ▁have + - ▁as + - th + - ▁are + - ▁sh + - ust + - ce + - ally + - ill + - ▁H + - ▁j + - ter + - ▁go + - ▁And + - ation + - ▁C + - ▁so + - ome + - ▁not + - op + - il + - ore + - ▁ne + - ▁can + - ▁me + - ▁at + - ould + - ant + - ▁M + - ▁like + - ere + - ▁they + - ra + - ers + - ▁ab + - ▁de + - ▁kn + - ge + - ▁Y + - ▁ch + - ul + - pp + - ▁or + - ▁al + - ▁con + - ▁com + - ess + - ▁su + - out + - ▁your + - ▁So + - ate + - ▁one + - ▁all + - ▁ex + - est + - ▁fr + - ▁just + - ▁pro + - ▁know + - ▁O + - ain + - ▁but + - ol + - ive + - ▁v + - use + - very + - art + - qu + - ▁my + - el + - ▁N + - nt + - ▁It + - ▁what + - ab + - ▁P + - ▁wor + - ▁out + - ▁there + - ▁up + - um + - ▁from + - pe + - ▁tw + - ▁r + - and + - ight + - ort + - un + - ▁L + - ist + - ▁about + - ide + - ig + - ake + - ▁D + - em + - os + - king + - rou + - ind + - our + - res + - ▁We + - ▁get + - ▁E + - ▁G + - ack + - ▁le + - ity + - od + - ▁F + - ard + - ▁pl + - ▁our + - ▁int + - ment + - ▁will + - ies + - ▁by + - ink + - ca + - ▁if + - red + - her + - ie + - ▁us + - ▁some + - ▁don + - ven + - ood + - ast + - ▁R + - ▁his + - ▁tim + - ▁tr + - ▁more + - ich + - ous + - ame + - ▁going + - ▁had + - ▁them + - ook + - ▁pe + - ▁Wh + - ▁You + - ▁But + - ine + - ▁here + - ▁would + - cause + - right + - so + - ost + - ure + - ▁has + - ect + - ▁think + - ▁fe + - ong + - ▁see + - ▁when + - ▁who + - ▁were + - ▁really + - ▁their + - ▁want + - one + - ople + - ▁then + - ▁time + - ▁sa + - ap + - ▁te + - ▁He + - ▁ye + - ck + - ▁her + - ▁thing + - ▁right + - ▁which + - itt + - ice + - act + - ▁people + - ty + - ▁two + - ▁J + - ▁im + - ther + - ci + - ose + - ▁cl + - ▁qu + - ▁man + - ▁also + - ree + - ▁en + - ud + - ▁how + - reat + - ak + - hing + - ag + - ▁any + - ff + - ace + - per + - ▁because + - ▁very + - own + - ▁ad + - ▁act + - ▁been + - ▁now + - ▁ag + - ▁into + - ▁comp + - ars + - ions + - are + - ite + - iv + - ▁these + - ays + - ep + - ▁This + - ▁she + - ans + - ah + - een + - ▁over + - ry + - ▁lo + - age + - ▁pr + - ▁sp + - ue + - ▁co + - ick + - ber + - ▁did + - ip + - ach + - ▁back + - ▁no + - ▁cont + - ▁other + - ▁every + - pt + - ▁need + - ▁him + - ▁U + - ▁In + - ▁work + - irst + - ▁part + - ▁look + - ittle + - ble + - iz + - ▁un + - ▁make + - omet + - nder + - ish + - na + - ▁little + - ▁off + - ▁than + - ▁got + - ually + - ▁per + - ▁good + - ▁way + - ▁could + - ▁ac + - ▁imp + - able + - ▁where + - iff + - ▁That + - ▁res + - ount + - pl + - ance + - ▁first + - ▁ro + - ▁pre + - ass + - ▁say + - int + - ated + - ire + - uch + - ase + - ▁somet + - ound + - ▁down + - ▁diff + - sel + - ▁gu + - ▁am + - ress + - ▁lot + - ence + - ▁dis + - orm + - ix + - ▁po + - ving + - enty + - ▁K + - ▁spe + - und + - he + - ▁much + - ▁ar + - round + - ▁app + - co + - ark + - ▁new + - ater + - ult + - end + - ▁even + - ▁start + - ations + - rough + - ile + - fter + - ▁well + - be + - ▁They + - ▁three + - ign + - ild + - ▁said + - ough + - ang + - ▁too + - ade + - ▁bl + - ens + - ▁inc + - ia + - ▁those + - ▁mo + - ▁take + - ▁through + - ▁fl + - ▁kind + - ▁things + - ▁bet + - ▁only + - ▁St + - ▁let + - cess + - ▁Ch + - ary + - vel + - ▁If + - xt + - other + - av + - ical + - ord + - ▁again + - ▁something + - onna + - fore + - ▁may + - ting + - ▁bu + - ▁differe + - urn + - ▁gonna + - ▁does + - uct + - og + - ▁twenty + - ▁gr + - ▁Ye + - wn + - ▁should + - ▁comm + - ition + - ▁under + - ▁hel + - ory + - ▁fo + - ▁use + - igh + - ife + - ▁actually + - ▁tal + - ▁call + - ents + - ious + - ull + - ▁There + - ▁Yeah + - ▁most + - ▁ke + - ors + - ved + - ys + - ▁sc + - ▁happ + - ope + - ▁help + - atch + - ▁What + - ▁rem + - ple + - ▁Now + - ▁br + - ool + - oth + - ▁four + - self + - ▁str + - ne + - thing + - ▁put + - ial + - ▁great + - ail + - ub + - ning + - ▁sm + - ▁feel + - ▁five + - ody + - undred + - iss + - ank + - get + - aking + - ▁many + - ▁hundred + - ▁years + - ▁being + - ▁come + - ▁mean + - ily + - ▁different + - ▁after + - ▁ser + - ▁show + - form + - ful + - oy + - ▁six + - ▁vide + - ▁V + - ▁its + - ▁point + - ▁day + - ▁des + - ons + - ▁bit + - ▁bel + - ▁before + - ▁aw + - ▁end + - ▁Oh + - ▁still + - ath + - ▁long + - ▁' + - ise + - ob + - day + - ▁add + - ft + - ves + - ces + - ady + - ▁cr + - ▁around + - ▁try + - les + - vers + - kay + - ian + - ates + - ▁find + - ward + - ▁As + - ▁eight + - lic + - ▁same + - ▁pos + - ▁em + - ▁made + - ▁supp + - ▁life + - ▁Be + - pect + - ▁dec + - ▁play + - ange + - ▁att + - ▁pers + - ways + - ▁high + - ▁hand + - ▁next + - ▁cons + - ▁own + - ▁inv + - ower + - ▁ind + - ert + - ng + - ave + - ▁year + - ▁big + - ating + - ▁world + - ▁rel + - ▁sure + - ▁tra + - ew + - ered + - ▁fin + - ▁Well + - ▁sl + - ▁doing + - bs + - ▁set + - ▁rec + - ual + - cial + - ▁ph + - erm + - ▁love + - ph + - ▁real + - ▁last + - ict + - ▁bo + - ▁ra + - ible + - ▁wr + - mer + - ▁count + - ities + - ▁always + - inet + - ments + - uc + - ▁might + - ▁inter + - ▁video + - gin + - ▁tell + - ▁never + - vent + - ▁import + - ied + - ▁sy + - ▁How + - ically + - ought + - ▁thir + - ▁rep + - ks + - ib + - ▁fam + - ject + - ▁bas + - ▁She + - ▁give + - akes + - ▁ninet + - ▁reg + - ▁min + - ▁op + - ▁def + - ▁didn + - te + - ▁cour + - ▁why + - ▁ent + - ▁place + - ▁ins + - ▁car + - ather + - ▁person + - ular + - ▁inst + - ▁prod + - lect + - ▁Al + - ▁today + - ▁bec + - ▁sur + - ▁All + - ▁another + - ▁bus + - ▁keep + - ell + - ese + - riend + - ▁quest + - ▁talk + - als + - ings + - ▁mon + - cond + - old + - ▁acc + - ▁la + - ▁num + - ident + - ▁che + - iness + - ▁turn + - ▁ear + - ▁No + - ousand + - ▁better + - ific + - ▁loo + - ▁gl + - oc + - ▁important + - ited + - ▁An + - ▁thousand + - ility + - llow + - ▁used + - ▁gen + - ▁sim + - li + - ▁happen + - ▁Un + - ▁Let + - air + - ock + - ably + - gg + - ▁watch + - ▁For + - ▁sw + - ren + - ute + - ever + - ▁pol + - ▁sch + - ▁When + - ▁such + - ▁fif + - ▁home + - ▁cle + - ▁contin + - ouse + - ▁friend + - uring + - ▁Okay + - gr + - ▁able + - ▁stud + - ▁eff + - hip + - body + - ▁top + - ness + - ▁exper + - ▁pret + - ▁both + - ▁done + - cri + - ▁mark + - ▁while + - ▁old + - ros + - ont + - ▁second + - ative + - ▁thought + - ▁best + - ▁found + - iew + - ▁belie + - ▁each + - erest + - ▁tri + - ▁eas + - ▁ca + - ▁fact + - ▁care + - ▁fun + - atter + - ures + - ▁head + - ▁lear + - ▁water + - ▁hard + - ▁few + - ▁side + - ween + - ▁exp + - ▁away + - its + - ▁ext + - lud + - ▁run + - ▁trans + - ince + - ▁sk + - ▁open + - cus + - ▁between + - ▁called + - ▁wee + - ▁pretty + - ason + - ▁far + - ember + - omm + - ▁interest + - any + - ner + - uff + - ▁pres + - ▁cur + - ▁child + - ee + - ▁toget + - ▁together + - olog + - ▁God + - ond + - ▁char + - ▁looking + - stem + - az + - cent + - ▁ob + - ▁ass + - land + - ▁doesn + - ▁business + - ▁course + - ▁ten + - ps + - arch + - ced + - ms + - ize + - nce + - ▁ref + - ▁name + - ross + - ▁grow + - oney + - ▁went + - ics + - teen + - ▁cou + - ▁prob + - ▁ret + - ▁guys + - ▁came + - ash + - led + - ▁Eur + - ues + - ▁ide + - gan + - ▁everything + - ▁getting + - ▁ask + - ▁cor + - ▁build + - ▁sign + - ▁small + - uck + - ▁el + - ▁col + - ▁Is + - ational + - stand + - cy + - ▁conf + - der + - ▁bre + - ▁cap + - ▁mod + - ets + - ike + - ▁number + - ▁comple + - ertain + - ▁ever + - ▁coll + - ▁hum + - ▁Europe + - ▁cre + - ▁met + - ▁exam + - ▁move + - ▁pass + - ▁left + - ▁system + - ▁includ + - ▁Thank + - cept + - ▁wom + - ▁product + - ten + - ▁rest + - ▁probably + - ▁dri + - ▁Do + - ▁gener + - ▁anything + - ▁lar + - ▁My + - ▁school + - ▁lead + - ▁sub + - ▁ty + - ▁plan + - ▁seem + - ▁whole + - irect + - ▁light + - ▁must + - ▁mom + - ▁opp + - ▁support + - ▁family + - ices + - amp + - ▁proble + - ▁dr + - ready + - ▁using + - ense + - ▁prov + - ush + - ax + - ▁power + - ▁Re + - alth + - ▁ev + - ▁stand + - ▁war + - ts + - ▁ + - e + - t + - o + - a + - 'n' + - i + - s + - r + - h + - l + - d + - u + - c + - m + - 'y' + - g + - w + - f + - p + - . + - b + - ',' + - v + - k + - '''' + - I + - T + - A + - S + - x + - W + - j + - B + - C + - H + - '?' + - M + - O + - 'Y' + - 'N' + - P + - E + - q + - L + - D + - z + - G + - F + - R + - '!' + - J + - U + - K + - V + - Q + - Z + - X +decoding: + strategy: greedy_batch + model_type: tdt + durations: + - 0 + - 1 + - 2 + - 3 + - 4 + greedy: + max_symbols: 10 + beam: + beam_size: 2 + return_best_hypothesis: false + score_norm: true + tsd_max_sym_exp: 50 + alsd_max_target_len: 2.0 +aux_ctc: + ctc_loss_weight: 0.3 + use_cer: false + ctc_reduction: mean_batch + decoder: + _target_: nemo.collections.asr.modules.ConvASRDecoder + feat_in: 512 + num_classes: 1024 + vocabulary: + - + - ▁t + - ▁th + - ▁a + - in + - re + - ▁the + - ▁w + - ▁s + - ▁o + - er + - ou + - at + - nd + - it + - ▁h + - ▁c + - ▁b + - is + - en + - 'on' + - ing + - ▁f + - ▁to + - ▁m + - es + - ▁p + - or + - an + - ▁d + - ll + - ▁I + - ed + - ▁and + - ▁l + - ▁of + - ▁in + - ▁y + - ar + - ▁g + - ▁you + - as + - om + - ▁n + - ve + - ▁that + - le + - ic + - us + - ow + - et + - al + - ▁e + - ut + - ▁it + - ot + - ▁be + - ▁T + - ion + - ▁is + - ▁wh + - ▁re + - ▁on + - ▁we + - ent + - ▁A + - ay + - ▁ha + - ▁Th + - id + - ▁S + - ac + - gh + - ver + - ke + - ▁for + - im + - ly + - ur + - ld + - ▁he + - ▁st + - all + - ro + - st + - se + - ct + - ith + - ir + - am + - ▁this + - if + - ▁W + - oo + - ri + - ▁was + - ght + - ▁u + - ▁with + - ad + - ch + - ▁se + - ▁k + - ▁an + - ▁The + - ▁li + - ▁do + - ▁B + - ▁have + - ▁as + - th + - ▁are + - ▁sh + - ust + - ce + - ally + - ill + - ▁H + - ▁j + - ter + - ▁go + - ▁And + - ation + - ▁C + - ▁so + - ome + - ▁not + - op + - il + - ore + - ▁ne + - ▁can + - ▁me + - ▁at + - ould + - ant + - ▁M + - ▁like + - ere + - ▁they + - ra + - ers + - ▁ab + - ▁de + - ▁kn + - ge + - ▁Y + - ▁ch + - ul + - pp + - ▁or + - ▁al + - ▁con + - ▁com + - ess + - ▁su + - out + - ▁your + - ▁So + - ate + - ▁one + - ▁all + - ▁ex + - est + - ▁fr + - ▁just + - ▁pro + - ▁know + - ▁O + - ain + - ▁but + - ol + - ive + - ▁v + - use + - very + - art + - qu + - ▁my + - el + - ▁N + - nt + - ▁It + - ▁what + - ab + - ▁P + - ▁wor + - ▁out + - ▁there + - ▁up + - um + - ▁from + - pe + - ▁tw + - ▁r + - and + - ight + - ort + - un + - ▁L + - ist + - ▁about + - ide + - ig + - ake + - ▁D + - em + - os + - king + - rou + - ind + - our + - res + - ▁We + - ▁get + - ▁E + - ▁G + - ack + - ▁le + - ity + - od + - ▁F + - ard + - ▁pl + - ▁our + - ▁int + - ment + - ▁will + - ies + - ▁by + - ink + - ca + - ▁if + - red + - her + - ie + - ▁us + - ▁some + - ▁don + - ven + - ood + - ast + - ▁R + - ▁his + - ▁tim + - ▁tr + - ▁more + - ich + - ous + - ame + - ▁going + - ▁had + - ▁them + - ook + - ▁pe + - ▁Wh + - ▁You + - ▁But + - ine + - ▁here + - ▁would + - cause + - right + - so + - ost + - ure + - ▁has + - ect + - ▁think + - ▁fe + - ong + - ▁see + - ▁when + - ▁who + - ▁were + - ▁really + - ▁their + - ▁want + - one + - ople + - ▁then + - ▁time + - ▁sa + - ap + - ▁te + - ▁He + - ▁ye + - ck + - ▁her + - ▁thing + - ▁right + - ▁which + - itt + - ice + - act + - ▁people + - ty + - ▁two + - ▁J + - ▁im + - ther + - ci + - ose + - ▁cl + - ▁qu + - ▁man + - ▁also + - ree + - ▁en + - ud + - ▁how + - reat + - ak + - hing + - ag + - ▁any + - ff + - ace + - per + - ▁because + - ▁very + - own + - ▁ad + - ▁act + - ▁been + - ▁now + - ▁ag + - ▁into + - ▁comp + - ars + - ions + - are + - ite + - iv + - ▁these + - ays + - ep + - ▁This + - ▁she + - ans + - ah + - een + - ▁over + - ry + - ▁lo + - age + - ▁pr + - ▁sp + - ue + - ▁co + - ick + - ber + - ▁did + - ip + - ach + - ▁back + - ▁no + - ▁cont + - ▁other + - ▁every + - pt + - ▁need + - ▁him + - ▁U + - ▁In + - ▁work + - irst + - ▁part + - ▁look + - ittle + - ble + - iz + - ▁un + - ▁make + - omet + - nder + - ish + - na + - ▁little + - ▁off + - ▁than + - ▁got + - ually + - ▁per + - ▁good + - ▁way + - ▁could + - ▁ac + - ▁imp + - able + - ▁where + - iff + - ▁That + - ▁res + - ount + - pl + - ance + - ▁first + - ▁ro + - ▁pre + - ass + - ▁say + - int + - ated + - ire + - uch + - ase + - ▁somet + - ound + - ▁down + - ▁diff + - sel + - ▁gu + - ▁am + - ress + - ▁lot + - ence + - ▁dis + - orm + - ix + - ▁po + - ving + - enty + - ▁K + - ▁spe + - und + - he + - ▁much + - ▁ar + - round + - ▁app + - co + - ark + - ▁new + - ater + - ult + - end + - ▁even + - ▁start + - ations + - rough + - ile + - fter + - ▁well + - be + - ▁They + - ▁three + - ign + - ild + - ▁said + - ough + - ang + - ▁too + - ade + - ▁bl + - ens + - ▁inc + - ia + - ▁those + - ▁mo + - ▁take + - ▁through + - ▁fl + - ▁kind + - ▁things + - ▁bet + - ▁only + - ▁St + - ▁let + - cess + - ▁Ch + - ary + - vel + - ▁If + - xt + - other + - av + - ical + - ord + - ▁again + - ▁something + - onna + - fore + - ▁may + - ting + - ▁bu + - ▁differe + - urn + - ▁gonna + - ▁does + - uct + - og + - ▁twenty + - ▁gr + - ▁Ye + - wn + - ▁should + - ▁comm + - ition + - ▁under + - ▁hel + - ory + - ▁fo + - ▁use + - igh + - ife + - ▁actually + - ▁tal + - ▁call + - ents + - ious + - ull + - ▁There + - ▁Yeah + - ▁most + - ▁ke + - ors + - ved + - ys + - ▁sc + - ▁happ + - ope + - ▁help + - atch + - ▁What + - ▁rem + - ple + - ▁Now + - ▁br + - ool + - oth + - ▁four + - self + - ▁str + - ne + - thing + - ▁put + - ial + - ▁great + - ail + - ub + - ning + - ▁sm + - ▁feel + - ▁five + - ody + - undred + - iss + - ank + - get + - aking + - ▁many + - ▁hundred + - ▁years + - ▁being + - ▁come + - ▁mean + - ily + - ▁different + - ▁after + - ▁ser + - ▁show + - form + - ful + - oy + - ▁six + - ▁vide + - ▁V + - ▁its + - ▁point + - ▁day + - ▁des + - ons + - ▁bit + - ▁bel + - ▁before + - ▁aw + - ▁end + - ▁Oh + - ▁still + - ath + - ▁long + - ▁' + - ise + - ob + - day + - ▁add + - ft + - ves + - ces + - ady + - ▁cr + - ▁around + - ▁try + - les + - vers + - kay + - ian + - ates + - ▁find + - ward + - ▁As + - ▁eight + - lic + - ▁same + - ▁pos + - ▁em + - ▁made + - ▁supp + - ▁life + - ▁Be + - pect + - ▁dec + - ▁play + - ange + - ▁att + - ▁pers + - ways + - ▁high + - ▁hand + - ▁next + - ▁cons + - ▁own + - ▁inv + - ower + - ▁ind + - ert + - ng + - ave + - ▁year + - ▁big + - ating + - ▁world + - ▁rel + - ▁sure + - ▁tra + - ew + - ered + - ▁fin + - ▁Well + - ▁sl + - ▁doing + - bs + - ▁set + - ▁rec + - ual + - cial + - ▁ph + - erm + - ▁love + - ph + - ▁real + - ▁last + - ict + - ▁bo + - ▁ra + - ible + - ▁wr + - mer + - ▁count + - ities + - ▁always + - inet + - ments + - uc + - ▁might + - ▁inter + - ▁video + - gin + - ▁tell + - ▁never + - vent + - ▁import + - ied + - ▁sy + - ▁How + - ically + - ought + - ▁thir + - ▁rep + - ks + - ib + - ▁fam + - ject + - ▁bas + - ▁She + - ▁give + - akes + - ▁ninet + - ▁reg + - ▁min + - ▁op + - ▁def + - ▁didn + - te + - ▁cour + - ▁why + - ▁ent + - ▁place + - ▁ins + - ▁car + - ather + - ▁person + - ular + - ▁inst + - ▁prod + - lect + - ▁Al + - ▁today + - ▁bec + - ▁sur + - ▁All + - ▁another + - ▁bus + - ▁keep + - ell + - ese + - riend + - ▁quest + - ▁talk + - als + - ings + - ▁mon + - cond + - old + - ▁acc + - ▁la + - ▁num + - ident + - ▁che + - iness + - ▁turn + - ▁ear + - ▁No + - ousand + - ▁better + - ific + - ▁loo + - ▁gl + - oc + - ▁important + - ited + - ▁An + - ▁thousand + - ility + - llow + - ▁used + - ▁gen + - ▁sim + - li + - ▁happen + - ▁Un + - ▁Let + - air + - ock + - ably + - gg + - ▁watch + - ▁For + - ▁sw + - ren + - ute + - ever + - ▁pol + - ▁sch + - ▁When + - ▁such + - ▁fif + - ▁home + - ▁cle + - ▁contin + - ouse + - ▁friend + - uring + - ▁Okay + - gr + - ▁able + - ▁stud + - ▁eff + - hip + - body + - ▁top + - ness + - ▁exper + - ▁pret + - ▁both + - ▁done + - cri + - ▁mark + - ▁while + - ▁old + - ros + - ont + - ▁second + - ative + - ▁thought + - ▁best + - ▁found + - iew + - ▁belie + - ▁each + - erest + - ▁tri + - ▁eas + - ▁ca + - ▁fact + - ▁care + - ▁fun + - atter + - ures + - ▁head + - ▁lear + - ▁water + - ▁hard + - ▁few + - ▁side + - ween + - ▁exp + - ▁away + - its + - ▁ext + - lud + - ▁run + - ▁trans + - ince + - ▁sk + - ▁open + - cus + - ▁between + - ▁called + - ▁wee + - ▁pretty + - ason + - ▁far + - ember + - omm + - ▁interest + - any + - ner + - uff + - ▁pres + - ▁cur + - ▁child + - ee + - ▁toget + - ▁together + - olog + - ▁God + - ond + - ▁char + - ▁looking + - stem + - az + - cent + - ▁ob + - ▁ass + - land + - ▁doesn + - ▁business + - ▁course + - ▁ten + - ps + - arch + - ced + - ms + - ize + - nce + - ▁ref + - ▁name + - ross + - ▁grow + - oney + - ▁went + - ics + - teen + - ▁cou + - ▁prob + - ▁ret + - ▁guys + - ▁came + - ash + - led + - ▁Eur + - ues + - ▁ide + - gan + - ▁everything + - ▁getting + - ▁ask + - ▁cor + - ▁build + - ▁sign + - ▁small + - uck + - ▁el + - ▁col + - ▁Is + - ational + - stand + - cy + - ▁conf + - der + - ▁bre + - ▁cap + - ▁mod + - ets + - ike + - ▁number + - ▁comple + - ertain + - ▁ever + - ▁coll + - ▁hum + - ▁Europe + - ▁cre + - ▁met + - ▁exam + - ▁move + - ▁pass + - ▁left + - ▁system + - ▁includ + - ▁Thank + - cept + - ▁wom + - ▁product + - ten + - ▁rest + - ▁probably + - ▁dri + - ▁Do + - ▁gener + - ▁anything + - ▁lar + - ▁My + - ▁school + - ▁lead + - ▁sub + - ▁ty + - ▁plan + - ▁seem + - ▁whole + - irect + - ▁light + - ▁must + - ▁mom + - ▁opp + - ▁support + - ▁family + - ices + - amp + - ▁proble + - ▁dr + - ready + - ▁using + - ense + - ▁prov + - ush + - ax + - ▁power + - ▁Re + - alth + - ▁ev + - ▁stand + - ▁war + - ts + - ▁ + - e + - t + - o + - a + - 'n' + - i + - s + - r + - h + - l + - d + - u + - c + - m + - 'y' + - g + - w + - f + - p + - . + - b + - ',' + - v + - k + - '''' + - I + - T + - A + - S + - x + - W + - j + - B + - C + - H + - '?' + - M + - O + - 'Y' + - 'N' + - P + - E + - q + - L + - D + - z + - G + - F + - R + - '!' + - J + - U + - K + - V + - Q + - Z + - X + decoding: + strategy: greedy + greedy: {} +interctc: + loss_weights: [] + apply_at_layers: [] +loss: + loss_name: tdt + tdt_kwargs: + fastemit_lambda: 0.0 + clamp: -1.0 + durations: + - 0 + - 1 + - 2 + - 3 + - 4 + sigma: 0.02 + omega: 0.1 +optim: + name: adamw + lr: 2.0 + betas: + - 0.9 + - 0.98 + weight_decay: 0.001 + sched: + name: NoamAnnealing + d_model: 512 + warmup_steps: 5000 + warmup_ratio: null + min_lr: 1.0e-06 +data: + train_ds: + shuffle_buffer_size: 20000 + buffer_size: 20000 + validation_ds: + num_workers: 4 +labels: +- +- ▁t +- ▁th +- ▁a +- in +- re +- ▁the +- ▁w +- ▁s +- ▁o +- er +- ou +- at +- nd +- it +- ▁h +- ▁c +- ▁b +- is +- en +- 'on' +- ing +- ▁f +- ▁to +- ▁m +- es +- ▁p +- or +- an +- ▁d +- ll +- ▁I +- ed +- ▁and +- ▁l +- ▁of +- ▁in +- ▁y +- ar +- ▁g +- ▁you +- as +- om +- ▁n +- ve +- ▁that +- le +- ic +- us +- ow +- et +- al +- ▁e +- ut +- ▁it +- ot +- ▁be +- ▁T +- ion +- ▁is +- ▁wh +- ▁re +- ▁on +- ▁we +- ent +- ▁A +- ay +- ▁ha +- ▁Th +- id +- ▁S +- ac +- gh +- ver +- ke +- ▁for +- im +- ly +- ur +- ld +- ▁he +- ▁st +- all +- ro +- st +- se +- ct +- ith +- ir +- am +- ▁this +- if +- ▁W +- oo +- ri +- ▁was +- ght +- ▁u +- ▁with +- ad +- ch +- ▁se +- ▁k +- ▁an +- ▁The +- ▁li +- ▁do +- ▁B +- ▁have +- ▁as +- th +- ▁are +- ▁sh +- ust +- ce +- ally +- ill +- ▁H +- ▁j +- ter +- ▁go +- ▁And +- ation +- ▁C +- ▁so +- ome +- ▁not +- op +- il +- ore +- ▁ne +- ▁can +- ▁me +- ▁at +- ould +- ant +- ▁M +- ▁like +- ere +- ▁they +- ra +- ers +- ▁ab +- ▁de +- ▁kn +- ge +- ▁Y +- ▁ch +- ul +- pp +- ▁or +- ▁al +- ▁con +- ▁com +- ess +- ▁su +- out +- ▁your +- ▁So +- ate +- ▁one +- ▁all +- ▁ex +- est +- ▁fr +- ▁just +- ▁pro +- ▁know +- ▁O +- ain +- ▁but +- ol +- ive +- ▁v +- use +- very +- art +- qu +- ▁my +- el +- ▁N +- nt +- ▁It +- ▁what +- ab +- ▁P +- ▁wor +- ▁out +- ▁there +- ▁up +- um +- ▁from +- pe +- ▁tw +- ▁r +- and +- ight +- ort +- un +- ▁L +- ist +- ▁about +- ide +- ig +- ake +- ▁D +- em +- os +- king +- rou +- ind +- our +- res +- ▁We +- ▁get +- ▁E +- ▁G +- ack +- ▁le +- ity +- od +- ▁F +- ard +- ▁pl +- ▁our +- ▁int +- ment +- ▁will +- ies +- ▁by +- ink +- ca +- ▁if +- red +- her +- ie +- ▁us +- ▁some +- ▁don +- ven +- ood +- ast +- ▁R +- ▁his +- ▁tim +- ▁tr +- ▁more +- ich +- ous +- ame +- ▁going +- ▁had +- ▁them +- ook +- ▁pe +- ▁Wh +- ▁You +- ▁But +- ine +- ▁here +- ▁would +- cause +- right +- so +- ost +- ure +- ▁has +- ect +- ▁think +- ▁fe +- ong +- ▁see +- ▁when +- ▁who +- ▁were +- ▁really +- ▁their +- ▁want +- one +- ople +- ▁then +- ▁time +- ▁sa +- ap +- ▁te +- ▁He +- ▁ye +- ck +- ▁her +- ▁thing +- ▁right +- ▁which +- itt +- ice +- act +- ▁people +- ty +- ▁two +- ▁J +- ▁im +- ther +- ci +- ose +- ▁cl +- ▁qu +- ▁man +- ▁also +- ree +- ▁en +- ud +- ▁how +- reat +- ak +- hing +- ag +- ▁any +- ff +- ace +- per +- ▁because +- ▁very +- own +- ▁ad +- ▁act +- ▁been +- ▁now +- ▁ag +- ▁into +- ▁comp +- ars +- ions +- are +- ite +- iv +- ▁these +- ays +- ep +- ▁This +- ▁she +- ans +- ah +- een +- ▁over +- ry +- ▁lo +- age +- ▁pr +- ▁sp +- ue +- ▁co +- ick +- ber +- ▁did +- ip +- ach +- ▁back +- ▁no +- ▁cont +- ▁other +- ▁every +- pt +- ▁need +- ▁him +- ▁U +- ▁In +- ▁work +- irst +- ▁part +- ▁look +- ittle +- ble +- iz +- ▁un +- ▁make +- omet +- nder +- ish +- na +- ▁little +- ▁off +- ▁than +- ▁got +- ually +- ▁per +- ▁good +- ▁way +- ▁could +- ▁ac +- ▁imp +- able +- ▁where +- iff +- ▁That +- ▁res +- ount +- pl +- ance +- ▁first +- ▁ro +- ▁pre +- ass +- ▁say +- int +- ated +- ire +- uch +- ase +- ▁somet +- ound +- ▁down +- ▁diff +- sel +- ▁gu +- ▁am +- ress +- ▁lot +- ence +- ▁dis +- orm +- ix +- ▁po +- ving +- enty +- ▁K +- ▁spe +- und +- he +- ▁much +- ▁ar +- round +- ▁app +- co +- ark +- ▁new +- ater +- ult +- end +- ▁even +- ▁start +- ations +- rough +- ile +- fter +- ▁well +- be +- ▁They +- ▁three +- ign +- ild +- ▁said +- ough +- ang +- ▁too +- ade +- ▁bl +- ens +- ▁inc +- ia +- ▁those +- ▁mo +- ▁take +- ▁through +- ▁fl +- ▁kind +- ▁things +- ▁bet +- ▁only +- ▁St +- ▁let +- cess +- ▁Ch +- ary +- vel +- ▁If +- xt +- other +- av +- ical +- ord +- ▁again +- ▁something +- onna +- fore +- ▁may +- ting +- ▁bu +- ▁differe +- urn +- ▁gonna +- ▁does +- uct +- og +- ▁twenty +- ▁gr +- ▁Ye +- wn +- ▁should +- ▁comm +- ition +- ▁under +- ▁hel +- ory +- ▁fo +- ▁use +- igh +- ife +- ▁actually +- ▁tal +- ▁call +- ents +- ious +- ull +- ▁There +- ▁Yeah +- ▁most +- ▁ke +- ors +- ved +- ys +- ▁sc +- ▁happ +- ope +- ▁help +- atch +- ▁What +- ▁rem +- ple +- ▁Now +- ▁br +- ool +- oth +- ▁four +- self +- ▁str +- ne +- thing +- ▁put +- ial +- ▁great +- ail +- ub +- ning +- ▁sm +- ▁feel +- ▁five +- ody +- undred +- iss +- ank +- get +- aking +- ▁many +- ▁hundred +- ▁years +- ▁being +- ▁come +- ▁mean +- ily +- ▁different +- ▁after +- ▁ser +- ▁show +- form +- ful +- oy +- ▁six +- ▁vide +- ▁V +- ▁its +- ▁point +- ▁day +- ▁des +- ons +- ▁bit +- ▁bel +- ▁before +- ▁aw +- ▁end +- ▁Oh +- ▁still +- ath +- ▁long +- ▁' +- ise +- ob +- day +- ▁add +- ft +- ves +- ces +- ady +- ▁cr +- ▁around +- ▁try +- les +- vers +- kay +- ian +- ates +- ▁find +- ward +- ▁As +- ▁eight +- lic +- ▁same +- ▁pos +- ▁em +- ▁made +- ▁supp +- ▁life +- ▁Be +- pect +- ▁dec +- ▁play +- ange +- ▁att +- ▁pers +- ways +- ▁high +- ▁hand +- ▁next +- ▁cons +- ▁own +- ▁inv +- ower +- ▁ind +- ert +- ng +- ave +- ▁year +- ▁big +- ating +- ▁world +- ▁rel +- ▁sure +- ▁tra +- ew +- ered +- ▁fin +- ▁Well +- ▁sl +- ▁doing +- bs +- ▁set +- ▁rec +- ual +- cial +- ▁ph +- erm +- ▁love +- ph +- ▁real +- ▁last +- ict +- ▁bo +- ▁ra +- ible +- ▁wr +- mer +- ▁count +- ities +- ▁always +- inet +- ments +- uc +- ▁might +- ▁inter +- ▁video +- gin +- ▁tell +- ▁never +- vent +- ▁import +- ied +- ▁sy +- ▁How +- ically +- ought +- ▁thir +- ▁rep +- ks +- ib +- ▁fam +- ject +- ▁bas +- ▁She +- ▁give +- akes +- ▁ninet +- ▁reg +- ▁min +- ▁op +- ▁def +- ▁didn +- te +- ▁cour +- ▁why +- ▁ent +- ▁place +- ▁ins +- ▁car +- ather +- ▁person +- ular +- ▁inst +- ▁prod +- lect +- ▁Al +- ▁today +- ▁bec +- ▁sur +- ▁All +- ▁another +- ▁bus +- ▁keep +- ell +- ese +- riend +- ▁quest +- ▁talk +- als +- ings +- ▁mon +- cond +- old +- ▁acc +- ▁la +- ▁num +- ident +- ▁che +- iness +- ▁turn +- ▁ear +- ▁No +- ousand +- ▁better +- ific +- ▁loo +- ▁gl +- oc +- ▁important +- ited +- ▁An +- ▁thousand +- ility +- llow +- ▁used +- ▁gen +- ▁sim +- li +- ▁happen +- ▁Un +- ▁Let +- air +- ock +- ably +- gg +- ▁watch +- ▁For +- ▁sw +- ren +- ute +- ever +- ▁pol +- ▁sch +- ▁When +- ▁such +- ▁fif +- ▁home +- ▁cle +- ▁contin +- ouse +- ▁friend +- uring +- ▁Okay +- gr +- ▁able +- ▁stud +- ▁eff +- hip +- body +- ▁top +- ness +- ▁exper +- ▁pret +- ▁both +- ▁done +- cri +- ▁mark +- ▁while +- ▁old +- ros +- ont +- ▁second +- ative +- ▁thought +- ▁best +- ▁found +- iew +- ▁belie +- ▁each +- erest +- ▁tri +- ▁eas +- ▁ca +- ▁fact +- ▁care +- ▁fun +- atter +- ures +- ▁head +- ▁lear +- ▁water +- ▁hard +- ▁few +- ▁side +- ween +- ▁exp +- ▁away +- its +- ▁ext +- lud +- ▁run +- ▁trans +- ince +- ▁sk +- ▁open +- cus +- ▁between +- ▁called +- ▁wee +- ▁pretty +- ason +- ▁far +- ember +- omm +- ▁interest +- any +- ner +- uff +- ▁pres +- ▁cur +- ▁child +- ee +- ▁toget +- ▁together +- olog +- ▁God +- ond +- ▁char +- ▁looking +- stem +- az +- cent +- ▁ob +- ▁ass +- land +- ▁doesn +- ▁business +- ▁course +- ▁ten +- ps +- arch +- ced +- ms +- ize +- nce +- ▁ref +- ▁name +- ross +- ▁grow +- oney +- ▁went +- ics +- teen +- ▁cou +- ▁prob +- ▁ret +- ▁guys +- ▁came +- ash +- led +- ▁Eur +- ues +- ▁ide +- gan +- ▁everything +- ▁getting +- ▁ask +- ▁cor +- ▁build +- ▁sign +- ▁small +- uck +- ▁el +- ▁col +- ▁Is +- ational +- stand +- cy +- ▁conf +- der +- ▁bre +- ▁cap +- ▁mod +- ets +- ike +- ▁number +- ▁comple +- ertain +- ▁ever +- ▁coll +- ▁hum +- ▁Europe +- ▁cre +- ▁met +- ▁exam +- ▁move +- ▁pass +- ▁left +- ▁system +- ▁includ +- ▁Thank +- cept +- ▁wom +- ▁product +- ten +- ▁rest +- ▁probably +- ▁dri +- ▁Do +- ▁gener +- ▁anything +- ▁lar +- ▁My +- ▁school +- ▁lead +- ▁sub +- ▁ty +- ▁plan +- ▁seem +- ▁whole +- irect +- ▁light +- ▁must +- ▁mom +- ▁opp +- ▁support +- ▁family +- ices +- amp +- ▁proble +- ▁dr +- ready +- ▁using +- ense +- ▁prov +- ush +- ax +- ▁power +- ▁Re +- alth +- ▁ev +- ▁stand +- ▁war +- ts +- ▁ +- e +- t +- o +- a +- 'n' +- i +- s +- r +- h +- l +- d +- u +- c +- m +- 'y' +- g +- w +- f +- p +- . +- b +- ',' +- v +- k +- '''' +- I +- T +- A +- S +- x +- W +- j +- B +- C +- H +- '?' +- M +- O +- 'Y' +- 'N' +- P +- E +- q +- L +- D +- z +- G +- F +- R +- '!' +- J +- U +- K +- V +- Q +- Z +- X +target: nemo.collections.asr.models.hybrid_rnnt_ctc_bpe_models.EncDecHybridRNNTCTCBPEModel +nemo_version: 1.23.0 diff --git a/src/glados/default_configs/phoneme_to_id.pkl b/src/glados/default_configs/phoneme_to_id.pkl new file mode 100644 index 00000000..10fe0a7d Binary files /dev/null and b/src/glados/default_configs/phoneme_to_id.pkl differ diff --git a/src/glados/default_configs/token_to_idx.pkl b/src/glados/default_configs/token_to_idx.pkl new file mode 100644 index 00000000..34d26232 Binary files /dev/null and b/src/glados/default_configs/token_to_idx.pkl differ diff --git a/src/glados/tui.py b/src/glados/tui.py index d8a71307..7cd00b90 100644 --- a/src/glados/tui.py +++ b/src/glados/tui.py @@ -17,6 +17,8 @@ from glados.core.engine import Glados, GladosConfig from glados.glados_ui.text_resources import aperture, help_text, login_text, recipe +from .utils.resources import resource_path, get_package_root + # Custom Widgets @@ -167,7 +169,7 @@ class SplashScreen(Screen[None]): # Ensure this path is correct relative to your project structure/runtime directory # Using a try-except block for robustness if the file is missing try: - with open(Path("src/glados/glados_ui/images/splash.ansi"), encoding="utf-8") as f: + with open(get_package_root() / "glados_ui/images/splash.ansi", encoding="utf-8") as f: SPLASH_ANSI = Text.from_ansi(f.read(), no_wrap=True, end="") except FileNotFoundError: logger.error("Splash screen ANSI art file not found. Using placeholder.") @@ -276,7 +278,7 @@ class GladosUI(App[None]): SUB_TITLE = "(c) 1982 Aperture Science, Inc." try: - with open(Path("src/glados/glados_ui/images/logo.ansi"), encoding="utf-8") as f: + with open(get_package_root() / "glados_ui/images/logo.ansi", encoding="utf-8") as f: LOGO_ANSI = Text.from_ansi(f.read(), no_wrap=True, end="") except FileNotFoundError: logger.error("Logo ANSI art file not found. Using placeholder.") @@ -434,7 +436,7 @@ def instantiate_glados(self) -> None: Glados: An instance of the GLaDOS engine. """ - config_path = Path("configs/glados_config.yaml") + config_path = resource_path("configs/glados_config.yaml") if not config_path.exists(): logger.error(f"GLaDOS config file not found: {config_path}") diff --git a/src/glados/utils/automated_install.py b/src/glados/utils/automated_install.py new file mode 100644 index 00000000..cc3b7971 --- /dev/null +++ b/src/glados/utils/automated_install.py @@ -0,0 +1,129 @@ +import asyncio +import os +import subprocess +import sys +from pathlib import Path +import yaml +from .resources import get_package_root + +def check_ollama_installed() -> bool: + """Check if Ollama is installed by running 'ollama --version'.""" + try: + subprocess.run(["ollama", "--version"], capture_output=True, text=True, check=True) + return True + except (subprocess.CalledProcessError, FileNotFoundError): + return False + +def install_ollama_windows(): + """Download and install Ollama on Windows.""" + download_url = "https://ollama.com/download/OllamaSetup.exe" + installer_path = Path("OllamaSetup.exe") + + try: + subprocess.run(["curl", "-L", download_url, "-o", str(installer_path)], check=True) + subprocess.run([str(installer_path)], check=True) + print("Ollama installed successfully on Windows") + except subprocess.CalledProcessError: + raise RuntimeError("Failed to install Ollama on Windows") + finally: + installer_path.unlink(missing_ok=True) + +def install_ollama_linux(): + """Install Ollama on Linux using the official script.""" + try: + subprocess.run("curl -fsSL https://ollama.com/install.sh | sh", shell=True, check=True) + print("Ollama installed successfully on Linux") + except subprocess.CalledProcessError: + raise RuntimeError("Failed to install Ollama on Linux") + +# This has not been tested yet ! +def install_ollama_macos(): + """Install Ollama on macOS using Homebrew or direct download.""" + try: + # Check if Homebrew is installed + if subprocess.run(["which", "brew"], capture_output=True, text=True).returncode == 0: + subprocess.run(["brew", "install", "ollama"], check=True) + print("Ollama installed successfully on macOS via Homebrew") + else: + # Fallback to direct download + download_url = "https://ollama.com/download/Ollama-darwin.zip" + installer_path = Path("Ollama-darwin.zip") + app_path = Path("/Applications/Ollama.app") + + subprocess.run(["curl", "-L", download_url, "-o", str(installer_path)], check=True) + subprocess.run(["unzip", str(installer_path), "-d", "/Applications"], check=True) + print("Ollama installed successfully on macOS to /Applications") + installer_path.unlink(missing_ok=True) + except subprocess.CalledProcessError: + raise RuntimeError("Failed to install Ollama on macOS") + +def main(): + # We have to import this here to avoid circular imports + # Meaning that python will try to import cli.py before this function is called + from ..cli import download_models, models_valid + + if check_ollama_installed(): + print("Ollama is already installed") + else: + print("Ollama is not installed") + if sys.platform == "win32": + print("Installing Ollama on Windows...") + install_ollama_windows() + elif sys.platform == "linux": + print("Installing Ollama on Linux...") + install_ollama_linux() + elif sys.platform == "darwin": + print("Installing Ollama on macOS...") + install_ollama_macos() + else: + raise RuntimeError("Unsupported platform. This script supports Windows, Linux, and macOS.") + print("Ollama installation complete") + + # Ensure those configuration files exist in the current working directory + default_configuration_files = [ + "configs/glados_config.yaml", + "models/ASR/parakeet-tdt_ctc-110m_model_config.yaml", + "models/ASR/parakeet-tdt-0.6b-v2_model_config.yaml", + "models/TTS/glados.json", + "models/TTS/idx_to_token.pkl", + "models/TTS/lang_phoneme_dict_old.pkl", + "models/TTS/lang_phoneme_dict.pkl", + "models/TTS/phoneme_to_id.pkl", + "models/TTS/token_to_idx.pkl", + "data/0.wav" + ] + for file in default_configuration_files: + relative_path = Path(os.getenv("PYAPP_RELATIVE_DIR")) / file + package_path = get_package_root() / "default_configs" / Path(file).name + + # Ensure the parent directory exists + relative_path.parent.mkdir(parents=True, exist_ok=True) + + # Copy the file from the package to the current working directory if it doesn't exist + if not relative_path.exists(): + with package_path.open("rb") as src, relative_path.open("wb") as dst: + print(f"Creating default config file {file}") + dst.write(src.read()) + else: + print(f"Config file {file} already exists.") + + if not models_valid(): + print("Some model files are invalid or missing, downloading...") + asyncio.run(download_models()) + + with (Path(os.getenv("PYAPP_RELATIVE_DIR")) / "configs/glados_config.yaml").open() as f: + config = yaml.safe_load(f) + + llm_model = config.get("Glados", {}).get("llm_model") + if not llm_model: + raise ValueError("No 'llm_model' specified in YAML file") + + print(f"Pulling model: {llm_model}") + try: + subprocess.run(["ollama", "pull", llm_model], check=True) + print(f"Model {llm_model} pulled successfully") + except subprocess.CalledProcessError: + raise RuntimeError(f"Failed to pull model: {llm_model}") + +if __name__ == "__main__": + main() diff --git a/src/glados/utils/resources.py b/src/glados/utils/resources.py index bc1c3e13..7087d1f1 100644 --- a/src/glados/utils/resources.py +++ b/src/glados/utils/resources.py @@ -10,10 +10,21 @@ def get_package_root() -> Path: """Get the absolute path to the package root directory (cached).""" # Get the directory where the glados module is located package_dir = Path(os.path.dirname(os.path.abspath(glados.__file__))) - # Go up to the project root (src/glados -> src -> project_root) - return package_dir.parent.parent + + # During pyapp runtime, the python package glados is located here: + # /home/yourUsername/.local/share/pyapp/glados/12151318069254528956/0.1.0/lib/python3.12/site-packages/glados + if os.getenv("PYAPP") != "1": + # Go up to the project root (src/glados -> src -> project_root) + package_dir = package_dir.parent.parent + + return package_dir def resource_path(relative_path: str) -> Path: """Return absolute path to a model file.""" - return get_package_root() / relative_path + if os.getenv("PYAPP") == "1": + root_path = Path(os.getenv("PYAPP_RELATIVE_DIR")) # Relative path to the executable + else: + root_path = get_package_root() + + return root_path / relative_path