388 lines
22 KiB
Plaintext
388 lines
22 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"id": "jdUlCWCXWX-C"
|
|
},
|
|
"source": [
|
|
"This example shows how to use llmware provided sample files for testing with WhisperCPP, integrated as of\n",
|
|
" llmware 0.2.11.\n",
|
|
"\n",
|
|
" # examples - \"famous_quotes\" | \"greatest_speeches\" | \"youtube_demos\" | \"earnings_calls\"\n",
|
|
"\n",
|
|
" -- famous_quotes - approximately 20 small .wav files with clips from old movies and speeches\n",
|
|
" -- greatest_speeches - approximately 60 famous historical speeches in english\n",
|
|
" -- youtube_videos - wav files of ~3 llmware youtube videos\n",
|
|
" -- earnings_calls - wav files of ~4 public company earnings calls (gathered from public investor relations)\n",
|
|
"\n",
|
|
" These sample files are hosted in a non-restricted AWS S3 bucket, and downloaded via the Setup method\n",
|
|
" `load_sample_voice_files`. There are two options:\n",
|
|
"\n",
|
|
" -- small_only = True: only pulls the 'famous_quotes' samples\n",
|
|
" -- small_only = False: pulls all of the samples (requires ~1.9 GB in total)\n",
|
|
"\n",
|
|
" Please note that all of these samples have been pulled from open public domain sources, including the\n",
|
|
" Internet Archives, e.g., https://archive.org. These sample files are being provided solely for the purpose of\n",
|
|
" testing the code scripts below. Please do not use them for any other purpose.\n",
|
|
"\n",
|
|
" To run these examples, please make sure to `pip install librosa`\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"id": "WM0bYHGyWpGu"
|
|
},
|
|
"source": [
|
|
"# If you are using Colab for free, we highly recommend you activate the T4 GPU\n",
|
|
"# hardware accelerator. Our models are designed to run with at least 16GB\n",
|
|
"# of RAM, activating T4 will grant the notebook 16GB of GDDR6 RAM as opposed\n",
|
|
"# to the ~13GB Colab gives automatically.\n",
|
|
"# To activate T4:\n",
|
|
"# 1. click on the \"Runtime\" tab\n",
|
|
"# 2. click on \"Change runtime type\"\n",
|
|
"# 3. select T4 GPU under Hardware Accelerator\n",
|
|
"# NOTE: there is a weekly usage limit on using T4 for free"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"metadata": {
|
|
"colab": {
|
|
"base_uri": "https://localhost:8080/"
|
|
},
|
|
"id": "4vi_LENqVGHp",
|
|
"outputId": "4b296c7b-e67a-4dee-faad-da3636c79858"
|
|
},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Requirement already satisfied: llmware in /usr/local/lib/python3.10/dist-packages (0.3.0)\n",
|
|
"Requirement already satisfied: boto3>=1.24.53 in /usr/local/lib/python3.10/dist-packages (from llmware) (1.34.129)\n",
|
|
"Requirement already satisfied: huggingface-hub>=0.19.4 in /usr/local/lib/python3.10/dist-packages (from llmware) (0.23.3)\n",
|
|
"Requirement already satisfied: numpy>=1.23.2 in /usr/local/lib/python3.10/dist-packages (from llmware) (1.25.2)\n",
|
|
"Requirement already satisfied: pymongo>=4.7.0 in /usr/local/lib/python3.10/dist-packages (from llmware) (4.7.3)\n",
|
|
"Requirement already satisfied: tokenizers>=0.15.0 in /usr/local/lib/python3.10/dist-packages (from llmware) (0.19.1)\n",
|
|
"Requirement already satisfied: psycopg-binary==3.1.17 in /usr/local/lib/python3.10/dist-packages (from llmware) (3.1.17)\n",
|
|
"Requirement already satisfied: psycopg==3.1.17 in /usr/local/lib/python3.10/dist-packages (from llmware) (3.1.17)\n",
|
|
"Requirement already satisfied: pgvector==0.2.4 in /usr/local/lib/python3.10/dist-packages (from llmware) (0.2.4)\n",
|
|
"Requirement already satisfied: colorama==0.4.6 in /usr/local/lib/python3.10/dist-packages (from llmware) (0.4.6)\n",
|
|
"Requirement already satisfied: librosa>=0.10.0 in /usr/local/lib/python3.10/dist-packages (from llmware) (0.10.2.post1)\n",
|
|
"Requirement already satisfied: typing-extensions>=4.1 in /usr/local/lib/python3.10/dist-packages (from psycopg==3.1.17->llmware) (4.12.2)\n",
|
|
"Requirement already satisfied: botocore<1.35.0,>=1.34.129 in /usr/local/lib/python3.10/dist-packages (from boto3>=1.24.53->llmware) (1.34.129)\n",
|
|
"Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from boto3>=1.24.53->llmware) (1.0.1)\n",
|
|
"Requirement already satisfied: s3transfer<0.11.0,>=0.10.0 in /usr/local/lib/python3.10/dist-packages (from boto3>=1.24.53->llmware) (0.10.1)\n",
|
|
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.4->llmware) (3.14.0)\n",
|
|
"Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.4->llmware) (2023.6.0)\n",
|
|
"Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.4->llmware) (24.1)\n",
|
|
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.4->llmware) (6.0.1)\n",
|
|
"Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.4->llmware) (2.31.0)\n",
|
|
"Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.4->llmware) (4.66.4)\n",
|
|
"Requirement already satisfied: audioread>=2.1.9 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (3.0.1)\n",
|
|
"Requirement already satisfied: scipy>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (1.11.4)\n",
|
|
"Requirement already satisfied: scikit-learn>=0.20.0 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (1.2.2)\n",
|
|
"Requirement already satisfied: joblib>=0.14 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (1.4.2)\n",
|
|
"Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (4.4.2)\n",
|
|
"Requirement already satisfied: numba>=0.51.0 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (0.58.1)\n",
|
|
"Requirement already satisfied: soundfile>=0.12.1 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (0.12.1)\n",
|
|
"Requirement already satisfied: pooch>=1.1 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (1.8.2)\n",
|
|
"Requirement already satisfied: soxr>=0.3.2 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (0.3.7)\n",
|
|
"Requirement already satisfied: lazy-loader>=0.1 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (0.4)\n",
|
|
"Requirement already satisfied: msgpack>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa>=0.10.0->llmware) (1.0.8)\n",
|
|
"Requirement already satisfied: dnspython<3.0.0,>=1.16.0 in /usr/local/lib/python3.10/dist-packages (from pymongo>=4.7.0->llmware) (2.6.1)\n",
|
|
"Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python3.10/dist-packages (from botocore<1.35.0,>=1.34.129->boto3>=1.24.53->llmware) (2.8.2)\n",
|
|
"Requirement already satisfied: urllib3!=2.2.0,<3,>=1.25.4 in /usr/local/lib/python3.10/dist-packages (from botocore<1.35.0,>=1.34.129->boto3>=1.24.53->llmware) (2.0.7)\n",
|
|
"Requirement already satisfied: llvmlite<0.42,>=0.41.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba>=0.51.0->librosa>=0.10.0->llmware) (0.41.1)\n",
|
|
"Requirement already satisfied: platformdirs>=2.5.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.1->librosa>=0.10.0->llmware) (4.2.2)\n",
|
|
"Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.19.4->llmware) (3.3.2)\n",
|
|
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.19.4->llmware) (3.7)\n",
|
|
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.19.4->llmware) (2024.6.2)\n",
|
|
"Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.20.0->librosa>=0.10.0->llmware) (3.5.0)\n",
|
|
"Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile>=0.12.1->librosa>=0.10.0->llmware) (1.16.0)\n",
|
|
"Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile>=0.12.1->librosa>=0.10.0->llmware) (2.22)\n",
|
|
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.35.0,>=1.34.129->boto3>=1.24.53->llmware) (1.16.0)\n",
|
|
"Requirement already satisfied: librosa in /usr/local/lib/python3.10/dist-packages (0.10.2.post1)\n",
|
|
"Requirement already satisfied: audioread>=2.1.9 in /usr/local/lib/python3.10/dist-packages (from librosa) (3.0.1)\n",
|
|
"Requirement already satisfied: numpy!=1.22.0,!=1.22.1,!=1.22.2,>=1.20.3 in /usr/local/lib/python3.10/dist-packages (from librosa) (1.25.2)\n",
|
|
"Requirement already satisfied: scipy>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from librosa) (1.11.4)\n",
|
|
"Requirement already satisfied: scikit-learn>=0.20.0 in /usr/local/lib/python3.10/dist-packages (from librosa) (1.2.2)\n",
|
|
"Requirement already satisfied: joblib>=0.14 in /usr/local/lib/python3.10/dist-packages (from librosa) (1.4.2)\n",
|
|
"Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.10/dist-packages (from librosa) (4.4.2)\n",
|
|
"Requirement already satisfied: numba>=0.51.0 in /usr/local/lib/python3.10/dist-packages (from librosa) (0.58.1)\n",
|
|
"Requirement already satisfied: soundfile>=0.12.1 in /usr/local/lib/python3.10/dist-packages (from librosa) (0.12.1)\n",
|
|
"Requirement already satisfied: pooch>=1.1 in /usr/local/lib/python3.10/dist-packages (from librosa) (1.8.2)\n",
|
|
"Requirement already satisfied: soxr>=0.3.2 in /usr/local/lib/python3.10/dist-packages (from librosa) (0.3.7)\n",
|
|
"Requirement already satisfied: typing-extensions>=4.1.1 in /usr/local/lib/python3.10/dist-packages (from librosa) (4.12.2)\n",
|
|
"Requirement already satisfied: lazy-loader>=0.1 in /usr/local/lib/python3.10/dist-packages (from librosa) (0.4)\n",
|
|
"Requirement already satisfied: msgpack>=1.0 in /usr/local/lib/python3.10/dist-packages (from librosa) (1.0.8)\n",
|
|
"Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from lazy-loader>=0.1->librosa) (24.1)\n",
|
|
"Requirement already satisfied: llvmlite<0.42,>=0.41.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba>=0.51.0->librosa) (0.41.1)\n",
|
|
"Requirement already satisfied: platformdirs>=2.5.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.1->librosa) (4.2.2)\n",
|
|
"Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from pooch>=1.1->librosa) (2.31.0)\n",
|
|
"Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.20.0->librosa) (3.5.0)\n",
|
|
"Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.10/dist-packages (from soundfile>=0.12.1->librosa) (1.16.0)\n",
|
|
"Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.0->soundfile>=0.12.1->librosa) (2.22)\n",
|
|
"Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.1->librosa) (3.3.2)\n",
|
|
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.1->librosa) (3.7)\n",
|
|
"Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.1->librosa) (2.0.7)\n",
|
|
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->pooch>=1.1->librosa) (2024.6.2)\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"!pip install llmware\n",
|
|
"!pip install librosa"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"id": "YlMbZEubW3P7"
|
|
},
|
|
"source": [
|
|
"\n",
|
|
"**Set the verbose config to TRUE if you would like a more detailed readout of the results.**\n",
|
|
"\n",
|
|
"**Set your language, English (en) is default.**"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"metadata": {
|
|
"id": "baMdUNuIwlrm"
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"\n",
|
|
"\n",
|
|
"import os\n",
|
|
"from llmware.models import ModelCatalog\n",
|
|
"from llmware.gguf_configs import GGUFConfigs\n",
|
|
"from llmware.setup import Setup\n",
|
|
"\n",
|
|
"# optional / to adjust various parameters of the model\n",
|
|
"GGUFConfigs().set_config(\"whisper_cpp_verbose\", \"OFF\")\n",
|
|
"GGUFConfigs().set_config(\"whisper_cpp_realtime_display\", True)\n",
|
|
"\n",
|
|
"# note: english is default output - change to 'es' | 'fr' | 'de' | 'it' ...\n",
|
|
"GGUFConfigs().set_config(\"whisper_language\", \"en\")\n",
|
|
"GGUFConfigs().set_config(\"whisper_remove_segment_markers\", True)\n",
|
|
"\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"metadata": {
|
|
"id": "cWTYJLfXWOzH"
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"def sample_files(example=\"famous_quotes\", small_only=False):\n",
|
|
"\n",
|
|
" \"\"\" Execute a basic inference on Voice-to-Text model passing a file_path string \"\"\"\n",
|
|
"\n",
|
|
" voice_samples = Setup().load_voice_sample_files(small_only=small_only)\n",
|
|
"\n",
|
|
" examples = [\"famous_quotes\", \"greatest_speeches\", \"youtube_demos\", \"earnings_calls\"]\n",
|
|
"\n",
|
|
" if example not in examples:\n",
|
|
" print(\"choose one of the following - \", examples)\n",
|
|
" return 0\n",
|
|
"\n",
|
|
" fp = os.path.join(voice_samples,example)\n",
|
|
"\n",
|
|
" files = os.listdir(fp)\n",
|
|
"\n",
|
|
" # these are the two key lines\n",
|
|
" whisper_base_english = \"whisper-cpp-base-english\"\n",
|
|
"\n",
|
|
" model = ModelCatalog().load_model(whisper_base_english)\n",
|
|
"\n",
|
|
" for f in files:\n",
|
|
"\n",
|
|
" if f.endswith(\".wav\"):\n",
|
|
"\n",
|
|
" prompt = os.path.join(fp,f)\n",
|
|
"\n",
|
|
" print(f\"\\n\\nPROCESSING: prompt = {prompt}\")\n",
|
|
"\n",
|
|
" response = model.inference(prompt)\n",
|
|
"\n",
|
|
" print(\"\\nllm response: \", response[\"llm_response\"])\n",
|
|
" print(\"usage: \", response[\"usage\"])\n",
|
|
"\n",
|
|
" return 0"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"id": "fAf9KlzBXhSm"
|
|
},
|
|
"source": [
|
|
"**Change the audio you want transcribed from our collection of sample files, or alter the code to point towards your own audio files.**"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 10,
|
|
"metadata": {
|
|
"colab": {
|
|
"base_uri": "https://localhost:8080/"
|
|
},
|
|
"id": "vo7_pq32WMz7",
|
|
"outputId": "aae49981-9fda-4374-c42a-c9610bcbb4b3"
|
|
},
|
|
"outputs": [
|
|
{
|
|
"name": "stderr",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1194: UserWarning: `local_dir_use_symlinks` parameter is deprecated and will be ignored. The process to download files to a local folder has been updated and do not rely on symlinks anymore. You only need to pass a destination folder as`local_dir`.\n",
|
|
"For more details, check out https://huggingface.co/docs/huggingface_hub/main/en/guides/download#download-files-to-local-folder.\n",
|
|
" warnings.warn(\n"
|
|
]
|
|
},
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/cusack_say_anything_career.wav\n",
|
|
"\n",
|
|
"llm response: i want to sell anything by anything or process anything as a career i want to sell anything but a process to buy anything so the process process anything so bought or process repair anything so bought a process you know it's a career i want to\n",
|
|
"usage: {'duration-seconds': 16.8298125, 'segments': 4, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/all_presidents_money.wav\n",
|
|
"\n",
|
|
"llm response: supposedly he's got a lawyer with twenty five thousand dollars and a brown paper bag. \"Hey follow the money.\" What do you mean? Well, I can't tell you that. But you could tell me that. No, I have to do this my way. You tell me what you know and I'll confirm. I'll keep you in the right direction if I can, but that's all. Just follow the money.\n",
|
|
"usage: {'duration-seconds': 31.0826875, 'segments': 9, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/cant_handle.wav\n",
|
|
"\n",
|
|
"llm response: I said I want the truth. You can't handle the truth. I said I want the truth. You can't handle the truth.\n",
|
|
"usage: {'duration-seconds': 7.096625, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/none_shall_pass.wav\n",
|
|
"\n",
|
|
"llm response: None shall pass. What none shall pass?\n",
|
|
"usage: {'duration-seconds': 4.8298125, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/field_dreams_he_will_come.wav\n",
|
|
"\n",
|
|
"llm response: if you build it, he will come.\n",
|
|
"usage: {'duration-seconds': 3.2624375, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/usual_suspects_smarter2.wav\n",
|
|
"\n",
|
|
"llm response: Let me get right to the point. I'm smarter than you. And I'm going to find out what I want to know. And I'm going to get it from you whether you like it or not.\n",
|
|
"usage: {'duration-seconds': 6.77225, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/life_moves_fast.wav\n",
|
|
"\n",
|
|
"llm response: life moves pretty fast you don't stop and look around once in a while\n",
|
|
"usage: {'duration-seconds': 4.5989375, 'segments': 2, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/bonds.wav\n",
|
|
"\n",
|
|
"llm response: Bond. James Bond. My name's Bond. James Bond. My name is Bond. James Bond. James Bond.\n",
|
|
"usage: {'duration-seconds': 12.57825, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/willy_wonka_questions.wav\n",
|
|
"\n",
|
|
"llm response: I'm sorry, but all questions must be submitted in writing.\n",
|
|
"usage: {'duration-seconds': 2.66875, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/wall_street_greed.wav\n",
|
|
"\n",
|
|
"llm response: Greed is good. Greed is right. Greed works.\n",
|
|
"usage: {'duration-seconds': 5.7818125, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/optimistic.wav\n",
|
|
"\n",
|
|
"llm response: The emperor does not share your optimistic appraisal of the situation.\n",
|
|
"usage: {'duration-seconds': 4.6734375, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/bond_james_bond.wav\n",
|
|
"\n",
|
|
"llm response: I admire your luck, Mr. Bond. Jamie's Bond.\n",
|
|
"usage: {'duration-seconds': 7.6161875, 'segments': 2, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/t3_judgment_day.wav\n",
|
|
"\n",
|
|
"llm response: the end of the world is today three hours from now two hours and fifty-three minutes.\n",
|
|
"usage: {'duration-seconds': 12.201375, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/t1_be_back.wav\n",
|
|
"\n",
|
|
"llm response: i'll be back.\n",
|
|
"usage: {'duration-seconds': 1.053375, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/jfk.wav\n",
|
|
"\n",
|
|
"llm response: And so my fellow Americans, ask not what your country can do for you, ask what you can do for your country.\n",
|
|
"usage: {'duration-seconds': 11.0, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/apologize.wav\n",
|
|
"\n",
|
|
"llm response: Alright, alright, I apologize. I'm really, really sorry. I apologize unreservedly. I offer a complete and utter retraction. The imputation was totally without basis in fact and was in no way fair comment and was motivated purely by malice. And I deeply regret any distress that my comments may have caused you or your family, and I hereby undertake not to repeat any such slander at any time in the future.<|endoftext|>\n",
|
|
"usage: {'duration-seconds': 28.143, 'segments': 1, 'language': 'en'}\n",
|
|
"\n",
|
|
"\n",
|
|
"PROCESSING: prompt = /root/llmware_data/voice_sample_files/famous_quotes/indiana_last_situation.wav\n",
|
|
"\n",
|
|
"llm response: Our situation has not improved.\n",
|
|
"usage: {'duration-seconds': 2.249625, 'segments': 1, 'language': 'en'}\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"if __name__ == \"__main__\":\n",
|
|
"\n",
|
|
" # pick among the four examples: famous_quotes | greatest_speeches | youtube_demos | earnings_calls\n",
|
|
"\n",
|
|
" sample_files(example=\"famous_quotes\", small_only=False)"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"accelerator": "GPU",
|
|
"colab": {
|
|
"gpuType": "T4",
|
|
"provenance": []
|
|
},
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"name": "python"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 0
|
|
}
|