{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Disease | \n",
" Fever | \n",
" Cough | \n",
" Fatigue | \n",
" Difficulty Breathing | \n",
" Age | \n",
" Gender | \n",
" Blood Pressure | \n",
" Cholesterol Level | \n",
" Outcome Variable | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Influenza | \n",
" Yes | \n",
" No | \n",
" Yes | \n",
" Yes | \n",
" 19 | \n",
" Female | \n",
" Low | \n",
" Normal | \n",
" Positive | \n",
"
\n",
" \n",
" 1 | \n",
" Common Cold | \n",
" No | \n",
" Yes | \n",
" Yes | \n",
" No | \n",
" 25 | \n",
" Female | \n",
" Normal | \n",
" Normal | \n",
" Negative | \n",
"
\n",
" \n",
" 2 | \n",
" Eczema | \n",
" No | \n",
" Yes | \n",
" Yes | \n",
" No | \n",
" 25 | \n",
" Female | \n",
" Normal | \n",
" Normal | \n",
" Negative | \n",
"
\n",
" \n",
" 3 | \n",
" Asthma | \n",
" Yes | \n",
" Yes | \n",
" No | \n",
" Yes | \n",
" 25 | \n",
" Male | \n",
" Normal | \n",
" Normal | \n",
" Positive | \n",
"
\n",
" \n",
" 4 | \n",
" Asthma | \n",
" Yes | \n",
" Yes | \n",
" No | \n",
" Yes | \n",
" 25 | \n",
" Male | \n",
" Normal | \n",
" Normal | \n",
" Positive | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Disease Fever Cough Fatigue Difficulty Breathing Age Gender \\\n",
"0 Influenza Yes No Yes Yes 19 Female \n",
"1 Common Cold No Yes Yes No 25 Female \n",
"2 Eczema No Yes Yes No 25 Female \n",
"3 Asthma Yes Yes No Yes 25 Male \n",
"4 Asthma Yes Yes No Yes 25 Male \n",
"\n",
" Blood Pressure Cholesterol Level Outcome Variable \n",
"0 Low Normal Positive \n",
"1 Normal Normal Negative \n",
"2 Normal Normal Negative \n",
"3 Normal Normal Positive \n",
"4 Normal Normal Positive "
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Loading dataset disease and symptoms dataset\n",
"import pandas as pd\n",
"\n",
"data = pd.read_csv(\"../artifacts/Disease_symptom_and_patient_profile_dataset.csv\")\n",
"diseases = data.copy()\n",
"data.head()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(349, 10)"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Data size\n",
"data.shape"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"RangeIndex: 349 entries, 0 to 348\n",
"Data columns (total 10 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 Disease 349 non-null object\n",
" 1 Fever 349 non-null object\n",
" 2 Cough 349 non-null object\n",
" 3 Fatigue 349 non-null object\n",
" 4 Difficulty Breathing 349 non-null object\n",
" 5 Age 349 non-null int64 \n",
" 6 Gender 349 non-null object\n",
" 7 Blood Pressure 349 non-null object\n",
" 8 Cholesterol Level 349 non-null object\n",
" 9 Outcome Variable 349 non-null object\n",
"dtypes: int64(1), object(9)\n",
"memory usage: 27.4+ KB\n"
]
}
],
"source": [
"# Info about dataset\n",
"data.info()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Disease 0\n",
"Fever 0\n",
"Cough 0\n",
"Fatigue 0\n",
"Difficulty Breathing 0\n",
"Age 0\n",
"Gender 0\n",
"Blood Pressure 0\n",
"Cholesterol Level 0\n",
"Outcome Variable 0\n",
"dtype: int64"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Exploratory data analysis\n",
"# Null values in the dataset\n",
"data.isnull().sum()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"49"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Duplicate entries\n",
"data.duplicated().sum()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Remove duplicates\n",
"data.drop_duplicates(inplace=True)\n",
"data.duplicated().sum()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Disease\n",
"Asthma 16\n",
"Osteoporosis 12\n",
"Stroke 11\n",
"Hypertension 10\n",
"Migraine 10\n",
" ..\n",
"Fibromyalgia 1\n",
"Eating Disorders (Anorexia,... 1\n",
"Chickenpox 1\n",
"Rabies 1\n",
"Williams Syndrome 1\n",
"Name: count, Length: 116, dtype: int64"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Nos of dieseases\n",
"data['Disease'].value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"count 300.000000\n",
"mean 45.756667\n",
"std 12.596548\n",
"min 19.000000\n",
"25% 35.000000\n",
"50% 45.000000\n",
"75% 55.000000\n",
"max 90.000000\n",
"Name: Age, dtype: float64"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Age range\n",
"data['Age'].describe()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"# Numerical columns ie Age column categorization\n",
"# Categories : Less than 40 - Young, 40-60 - Mid, and above 60 aged\n",
"def age_category(age):\n",
" if age < 40:\n",
" return 'young'\n",
" elif age < 60:\n",
" return 'Middle'\n",
" elif age >= 60:\n",
" return 'Old'\n",
" \n",
"data['Age'] = data['Age'].apply(lambda x: age_category(x))"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Disease | \n",
" Fever | \n",
" Cough | \n",
" Fatigue | \n",
" Difficulty Breathing | \n",
" Age | \n",
" Gender | \n",
" Blood Pressure | \n",
" Cholesterol Level | \n",
" Outcome Variable | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Influenza | \n",
" Yes | \n",
" No | \n",
" Yes | \n",
" Yes | \n",
" young | \n",
" Female | \n",
" Low | \n",
" Normal | \n",
" Positive | \n",
"
\n",
" \n",
" 1 | \n",
" Common Cold | \n",
" No | \n",
" Yes | \n",
" Yes | \n",
" No | \n",
" young | \n",
" Female | \n",
" Normal | \n",
" Normal | \n",
" Negative | \n",
"
\n",
" \n",
" 2 | \n",
" Eczema | \n",
" No | \n",
" Yes | \n",
" Yes | \n",
" No | \n",
" young | \n",
" Female | \n",
" Normal | \n",
" Normal | \n",
" Negative | \n",
"
\n",
" \n",
" 3 | \n",
" Asthma | \n",
" Yes | \n",
" Yes | \n",
" No | \n",
" Yes | \n",
" young | \n",
" Male | \n",
" Normal | \n",
" Normal | \n",
" Positive | \n",
"
\n",
" \n",
" 5 | \n",
" Eczema | \n",
" Yes | \n",
" No | \n",
" No | \n",
" No | \n",
" young | \n",
" Female | \n",
" Normal | \n",
" Normal | \n",
" Positive | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Disease Fever Cough Fatigue Difficulty Breathing Age Gender \\\n",
"0 Influenza Yes No Yes Yes young Female \n",
"1 Common Cold No Yes Yes No young Female \n",
"2 Eczema No Yes Yes No young Female \n",
"3 Asthma Yes Yes No Yes young Male \n",
"5 Eczema Yes No No No young Female \n",
"\n",
" Blood Pressure Cholesterol Level Outcome Variable \n",
"0 Low Normal Positive \n",
"1 Normal Normal Negative \n",
"2 Normal Normal Negative \n",
"3 Normal Normal Positive \n",
"5 Normal Normal Positive "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data.head()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"# Categorical columns encoding\n",
"from sklearn.preprocessing import LabelEncoder\n",
"\n",
"le = LabelEncoder()\n",
"data['Fever'] = le.fit_transform(data['Fever'])\n",
"data['Cough'] = le.fit_transform(data['Cough'])\n",
"data['Fatigue'] = le.fit_transform(data['Fatigue'])\n",
"data['Difficulty Breathing'] = le.fit_transform(data['Difficulty Breathing'])\n",
"data['Age'] = le.fit_transform(data['Age'])\n",
"data['Gender'] = le.fit_transform(data['Gender'])\n",
"data['Blood Pressure'] = le.fit_transform(data['Blood Pressure'])\n",
"data['Cholesterol Level'] = le.fit_transform(data['Cholesterol Level'])\n",
"data['Outcome Variable'] = le.fit_transform(data['Outcome Variable'])"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Disease | \n",
" Fever | \n",
" Cough | \n",
" Fatigue | \n",
" Difficulty Breathing | \n",
" Age | \n",
" Gender | \n",
" Blood Pressure | \n",
" Cholesterol Level | \n",
" Outcome Variable | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Influenza | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 2 | \n",
" 0 | \n",
" 1 | \n",
" 2 | \n",
" 1 | \n",
"
\n",
" \n",
" 1 | \n",
" Common Cold | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
"
\n",
" \n",
" 2 | \n",
" Eczema | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
"
\n",
" \n",
" 3 | \n",
" Asthma | \n",
" 1 | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 2 | \n",
" 1 | \n",
" 2 | \n",
" 2 | \n",
" 1 | \n",
"
\n",
" \n",
" 5 | \n",
" Eczema | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 1 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Disease Fever Cough Fatigue Difficulty Breathing Age Gender \\\n",
"0 Influenza 1 0 1 1 2 0 \n",
"1 Common Cold 0 1 1 0 2 0 \n",
"2 Eczema 0 1 1 0 2 0 \n",
"3 Asthma 1 1 0 1 2 1 \n",
"5 Eczema 1 0 0 0 2 0 \n",
"\n",
" Blood Pressure Cholesterol Level Outcome Variable \n",
"0 1 2 1 \n",
"1 2 2 0 \n",
"2 2 2 0 \n",
"3 2 2 1 \n",
"5 2 2 1 "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Labelled data\n",
"data.head()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"# Features selection\n",
"# Predictor variables\n",
"X = data.drop(['Disease', 'Outcome Variable'], axis=1)\n",
"\n",
"# Target variable\n",
"y = data['Outcome Variable']"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"# Splitting of dataset\n",
"from sklearn.model_selection import train_test_split\n",
"\n",
"X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"((240, 8), (60, 8))"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Split size verification\n",
"X_train.shape, X_test.shape"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"# Model training\n",
"from sklearn.linear_model import LogisticRegression\n",
"\n",
"logit_model = LogisticRegression()\n",
"logit_model = logit_model.fit(X_train,y_train)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.75"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Model evaluation\n",
"logit_model.score(X_test,y_test)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"# Catboost model\n",
"from catboost import CatBoostClassifier\n",
"\n",
"cat_model = CatBoostClassifier(verbose=False)\n",
"cat_model = cat_model.fit(X_train,y_train)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.7333333333333333"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Model evaluation\n",
"cat_model.score(X_test,y_test)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"# Logistic regresson model has better performance\n",
"import pickle\n",
"\n",
"with open(\"Logit_model.pkl\", 'wb') as file:\n",
" pickle.dump(logit_model, file)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"c:\\Users\\umesh\\anaconda3\\envs\\GenAI\\Lib\\site-packages\\pydub\\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work\n",
" warn(\"Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work\", RuntimeWarning)\n",
"c:\\Users\\umesh\\anaconda3\\envs\\GenAI\\Lib\\site-packages\\pydub\\utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work\n",
" warn(\"Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work\", RuntimeWarning)\n"
]
},
{
"ename": "FileNotFoundError",
"evalue": "[WinError 2] The system cannot find the file specified",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[1], line 9\u001b[0m\n\u001b[0;32m 6\u001b[0m langs\u001b[38;5;241m=\u001b[39mtts_langs()\u001b[38;5;241m.\u001b[39mkeys()\n\u001b[0;32m 8\u001b[0m \u001b[38;5;66;03m#get the audio first\u001b[39;00m\n\u001b[1;32m----> 9\u001b[0m audio\u001b[38;5;241m=\u001b[39mtext_to_audio(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mChoose a language, type some text, and click \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mSpeak it out!\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m.\u001b[39m\u001b[38;5;124m\"\u001b[39m,language\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124men\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m 10\u001b[0m \u001b[38;5;66;03m#then play it\u001b[39;00m\n\u001b[0;32m 11\u001b[0m auto_play(audio)\n",
"File \u001b[1;32mc:\\Users\\umesh\\anaconda3\\envs\\GenAI\\Lib\\site-packages\\streamlit_TTS\\__init__.py:72\u001b[0m, in \u001b[0;36mtext_to_audio\u001b[1;34m(text, language, cleanup_hook)\u001b[0m\n\u001b[0;32m 69\u001b[0m mp3_buffer\u001b[38;5;241m.\u001b[39mseek(\u001b[38;5;241m0\u001b[39m)\n\u001b[0;32m 71\u001b[0m \u001b[38;5;66;03m# Convert MP3 to WAV and make it mono\u001b[39;00m\n\u001b[1;32m---> 72\u001b[0m audio \u001b[38;5;241m=\u001b[39m AudioSegment\u001b[38;5;241m.\u001b[39mfrom_file(mp3_buffer,\u001b[38;5;28mformat\u001b[39m\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmp3\u001b[39m\u001b[38;5;124m\"\u001b[39m)\u001b[38;5;241m.\u001b[39mset_channels(\u001b[38;5;241m1\u001b[39m)\n\u001b[0;32m 74\u001b[0m \u001b[38;5;66;03m# Extract audio properties\u001b[39;00m\n\u001b[0;32m 75\u001b[0m sample_rate \u001b[38;5;241m=\u001b[39m audio\u001b[38;5;241m.\u001b[39mframe_rate\n",
"File \u001b[1;32mc:\\Users\\umesh\\anaconda3\\envs\\GenAI\\Lib\\site-packages\\pydub\\audio_segment.py:728\u001b[0m, in \u001b[0;36mAudioSegment.from_file\u001b[1;34m(cls, file, format, codec, parameters, start_second, duration, **kwargs)\u001b[0m\n\u001b[0;32m 726\u001b[0m info \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 727\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m--> 728\u001b[0m info \u001b[38;5;241m=\u001b[39m mediainfo_json(orig_file, read_ahead_limit\u001b[38;5;241m=\u001b[39mread_ahead_limit)\n\u001b[0;32m 729\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m info:\n\u001b[0;32m 730\u001b[0m audio_streams \u001b[38;5;241m=\u001b[39m [x \u001b[38;5;28;01mfor\u001b[39;00m x \u001b[38;5;129;01min\u001b[39;00m info[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mstreams\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[0;32m 731\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m x[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mcodec_type\u001b[39m\u001b[38;5;124m'\u001b[39m] \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124maudio\u001b[39m\u001b[38;5;124m'\u001b[39m]\n",
"File \u001b[1;32mc:\\Users\\umesh\\anaconda3\\envs\\GenAI\\Lib\\site-packages\\pydub\\utils.py:274\u001b[0m, in \u001b[0;36mmediainfo_json\u001b[1;34m(filepath, read_ahead_limit)\u001b[0m\n\u001b[0;32m 271\u001b[0m file\u001b[38;5;241m.\u001b[39mclose()\n\u001b[0;32m 273\u001b[0m command \u001b[38;5;241m=\u001b[39m [prober, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m-of\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mjson\u001b[39m\u001b[38;5;124m'\u001b[39m] \u001b[38;5;241m+\u001b[39m command_args\n\u001b[1;32m--> 274\u001b[0m res \u001b[38;5;241m=\u001b[39m Popen(command, stdin\u001b[38;5;241m=\u001b[39mstdin_parameter, stdout\u001b[38;5;241m=\u001b[39mPIPE, stderr\u001b[38;5;241m=\u001b[39mPIPE)\n\u001b[0;32m 275\u001b[0m output, stderr \u001b[38;5;241m=\u001b[39m res\u001b[38;5;241m.\u001b[39mcommunicate(\u001b[38;5;28minput\u001b[39m\u001b[38;5;241m=\u001b[39mstdin_data)\n\u001b[0;32m 276\u001b[0m output \u001b[38;5;241m=\u001b[39m output\u001b[38;5;241m.\u001b[39mdecode(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mutf-8\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mignore\u001b[39m\u001b[38;5;124m'\u001b[39m)\n",
"File \u001b[1;32mc:\\Users\\umesh\\anaconda3\\envs\\GenAI\\Lib\\subprocess.py:1026\u001b[0m, in \u001b[0;36mPopen.__init__\u001b[1;34m(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize, process_group)\u001b[0m\n\u001b[0;32m 1022\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtext_mode:\n\u001b[0;32m 1023\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mstderr \u001b[38;5;241m=\u001b[39m io\u001b[38;5;241m.\u001b[39mTextIOWrapper(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mstderr,\n\u001b[0;32m 1024\u001b[0m encoding\u001b[38;5;241m=\u001b[39mencoding, errors\u001b[38;5;241m=\u001b[39merrors)\n\u001b[1;32m-> 1026\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_execute_child(args, executable, preexec_fn, close_fds,\n\u001b[0;32m 1027\u001b[0m pass_fds, cwd, env,\n\u001b[0;32m 1028\u001b[0m startupinfo, creationflags, shell,\n\u001b[0;32m 1029\u001b[0m p2cread, p2cwrite,\n\u001b[0;32m 1030\u001b[0m c2pread, c2pwrite,\n\u001b[0;32m 1031\u001b[0m errread, errwrite,\n\u001b[0;32m 1032\u001b[0m restore_signals,\n\u001b[0;32m 1033\u001b[0m gid, gids, uid, umask,\n\u001b[0;32m 1034\u001b[0m start_new_session, process_group)\n\u001b[0;32m 1035\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m:\n\u001b[0;32m 1036\u001b[0m \u001b[38;5;66;03m# Cleanup if the child failed starting.\u001b[39;00m\n\u001b[0;32m 1037\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m f \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mfilter\u001b[39m(\u001b[38;5;28;01mNone\u001b[39;00m, (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mstdin, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mstdout, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mstderr)):\n",
"File \u001b[1;32mc:\\Users\\umesh\\anaconda3\\envs\\GenAI\\Lib\\subprocess.py:1538\u001b[0m, in \u001b[0;36mPopen._execute_child\u001b[1;34m(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session, unused_process_group)\u001b[0m\n\u001b[0;32m 1536\u001b[0m \u001b[38;5;66;03m# Start the process\u001b[39;00m\n\u001b[0;32m 1537\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m-> 1538\u001b[0m hp, ht, pid, tid \u001b[38;5;241m=\u001b[39m _winapi\u001b[38;5;241m.\u001b[39mCreateProcess(executable, args,\n\u001b[0;32m 1539\u001b[0m \u001b[38;5;66;03m# no special security\u001b[39;00m\n\u001b[0;32m 1540\u001b[0m \u001b[38;5;28;01mNone\u001b[39;00m, \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[0;32m 1541\u001b[0m \u001b[38;5;28mint\u001b[39m(\u001b[38;5;129;01mnot\u001b[39;00m close_fds),\n\u001b[0;32m 1542\u001b[0m creationflags,\n\u001b[0;32m 1543\u001b[0m env,\n\u001b[0;32m 1544\u001b[0m cwd,\n\u001b[0;32m 1545\u001b[0m startupinfo)\n\u001b[0;32m 1546\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[0;32m 1547\u001b[0m \u001b[38;5;66;03m# Child is launched. Close the parent's copy of those pipe\u001b[39;00m\n\u001b[0;32m 1548\u001b[0m \u001b[38;5;66;03m# handles that only the child should have open. You need\u001b[39;00m\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 1551\u001b[0m \u001b[38;5;66;03m# pipe will not close when the child process exits and the\u001b[39;00m\n\u001b[0;32m 1552\u001b[0m \u001b[38;5;66;03m# ReadFile will hang.\u001b[39;00m\n\u001b[0;32m 1553\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_close_pipe_fds(p2cread, p2cwrite,\n\u001b[0;32m 1554\u001b[0m c2pread, c2pwrite,\n\u001b[0;32m 1555\u001b[0m errread, errwrite)\n",
"\u001b[1;31mFileNotFoundError\u001b[0m: [WinError 2] The system cannot find the file specified"
]
}
],
"source": [
"import streamlit as st\n",
"from streamlit_TTS import auto_play, text_to_speech, text_to_audio\n",
"\n",
"from gtts.lang import tts_langs\n",
"\n",
"langs=tts_langs().keys()\n",
"\n",
"#get the audio first\n",
"audio=text_to_audio(\"Choose a language, type some text, and click 'Speak it out!'.\", language='en')\n",
"#then play it\n",
"auto_play(audio)\n",
"\n",
"lang=st.selectbox(\"Choose a language\",options=langs)\n",
"text=st.text_input(\"Choose a text to speak out:\")\n",
"speak=st.button(\"Speak it out!\")\n",
"\n",
"if lang and text and speak:\n",
" #plays the audio directly\n",
" text_to_speech(text=text, language=lang)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting streamlit-bokeh-events\n",
" Downloading streamlit_bokeh_events-0.1.2-py3-none-any.whl.metadata (407 bytes)\n",
"Requirement already satisfied: bokeh>=2.0.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit-bokeh-events) (3.6.0)\n",
"Requirement already satisfied: streamlit>=0.63 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit-bokeh-events) (1.39.0)\n",
"Requirement already satisfied: Jinja2>=2.9 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from bokeh>=2.0.0->streamlit-bokeh-events) (3.1.2)\n",
"Requirement already satisfied: contourpy>=1.2 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from bokeh>=2.0.0->streamlit-bokeh-events) (1.3.0)\n",
"Requirement already satisfied: numpy>=1.16 in c:\\users\\umesh\\appdata\\roaming\\python\\python310\\site-packages (from bokeh>=2.0.0->streamlit-bokeh-events) (1.26.4)\n",
"Requirement already satisfied: packaging>=16.8 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from bokeh>=2.0.0->streamlit-bokeh-events) (24.1)\n",
"Requirement already satisfied: pandas>=1.2 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from bokeh>=2.0.0->streamlit-bokeh-events) (2.1.1)\n",
"Requirement already satisfied: pillow>=7.1.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from bokeh>=2.0.0->streamlit-bokeh-events) (9.5.0)\n",
"Requirement already satisfied: PyYAML>=3.10 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from bokeh>=2.0.0->streamlit-bokeh-events) (6.0.1)\n",
"Requirement already satisfied: tornado>=6.2 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from bokeh>=2.0.0->streamlit-bokeh-events) (6.3.3)\n",
"Requirement already satisfied: xyzservices>=2021.09.1 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from bokeh>=2.0.0->streamlit-bokeh-events) (2024.9.0)\n",
"Requirement already satisfied: altair<6,>=4.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (5.4.1)\n",
"Requirement already satisfied: blinker<2,>=1.0.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (1.6.2)\n",
"Requirement already satisfied: cachetools<6,>=4.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (4.2.2)\n",
"Requirement already satisfied: click<9,>=7.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (8.1.7)\n",
"Requirement already satisfied: protobuf<6,>=3.20 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (3.20.3)\n",
"Requirement already satisfied: pyarrow>=7.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (11.0.0)\n",
"Requirement already satisfied: requests<3,>=2.27 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (2.31.0)\n",
"Requirement already satisfied: rich<14,>=10.14.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (13.7.1)\n",
"Requirement already satisfied: tenacity<10,>=8.1.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (8.2.2)\n",
"Requirement already satisfied: toml<2,>=0.10.1 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (0.10.2)\n",
"Requirement already satisfied: typing-extensions<5,>=4.3.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (4.12.2)\n",
"Requirement already satisfied: gitpython!=3.1.19,<4,>=3.0.7 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (3.1.43)\n",
"Requirement already satisfied: pydeck<1,>=0.8.0b4 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (0.9.1)\n",
"Requirement already satisfied: watchdog<6,>=2.1.5 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from streamlit>=0.63->streamlit-bokeh-events) (5.0.3)\n",
"Requirement already satisfied: jsonschema>=3.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from altair<6,>=4.0->streamlit>=0.63->streamlit-bokeh-events) (4.19.2)\n",
"Requirement already satisfied: narwhals>=1.5.2 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from altair<6,>=4.0->streamlit>=0.63->streamlit-bokeh-events) (1.12.1)\n",
"Requirement already satisfied: colorama in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from click<9,>=7.0->streamlit>=0.63->streamlit-bokeh-events) (0.4.6)\n",
"Requirement already satisfied: gitdb<5,>=4.0.1 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from gitpython!=3.1.19,<4,>=3.0.7->streamlit>=0.63->streamlit-bokeh-events) (4.0.11)\n",
"Requirement already satisfied: MarkupSafe>=2.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from Jinja2>=2.9->bokeh>=2.0.0->streamlit-bokeh-events) (2.1.1)\n",
"Requirement already satisfied: python-dateutil>=2.8.2 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from pandas>=1.2->bokeh>=2.0.0->streamlit-bokeh-events) (2.8.2)\n",
"Requirement already satisfied: pytz>=2020.1 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from pandas>=1.2->bokeh>=2.0.0->streamlit-bokeh-events) (2023.3.post1)\n",
"Requirement already satisfied: tzdata>=2022.1 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from pandas>=1.2->bokeh>=2.0.0->streamlit-bokeh-events) (2023.3)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from requests<3,>=2.27->streamlit>=0.63->streamlit-bokeh-events) (2.0.4)\n",
"Requirement already satisfied: idna<4,>=2.5 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from requests<3,>=2.27->streamlit>=0.63->streamlit-bokeh-events) (3.4)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from requests<3,>=2.27->streamlit>=0.63->streamlit-bokeh-events) (1.26.18)\n",
"Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from requests<3,>=2.27->streamlit>=0.63->streamlit-bokeh-events) (2024.2.2)\n",
"Requirement already satisfied: markdown-it-py>=2.2.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from rich<14,>=10.14.0->streamlit>=0.63->streamlit-bokeh-events) (3.0.0)\n",
"Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from rich<14,>=10.14.0->streamlit>=0.63->streamlit-bokeh-events) (2.15.1)\n",
"Requirement already satisfied: smmap<6,>=3.0.1 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from gitdb<5,>=4.0.1->gitpython!=3.1.19,<4,>=3.0.7->streamlit>=0.63->streamlit-bokeh-events) (5.0.1)\n",
"Requirement already satisfied: attrs>=22.2.0 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit>=0.63->streamlit-bokeh-events) (23.1.0)\n",
"Requirement already satisfied: jsonschema-specifications>=2023.03.6 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit>=0.63->streamlit-bokeh-events) (2023.7.1)\n",
"Requirement already satisfied: referencing>=0.28.4 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit>=0.63->streamlit-bokeh-events) (0.30.2)\n",
"Requirement already satisfied: rpds-py>=0.7.1 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit>=0.63->streamlit-bokeh-events) (0.10.6)\n",
"Requirement already satisfied: mdurl~=0.1 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from markdown-it-py>=2.2.0->rich<14,>=10.14.0->streamlit>=0.63->streamlit-bokeh-events) (0.1.2)\n",
"Requirement already satisfied: six>=1.5 in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (from python-dateutil>=2.8.2->pandas>=1.2->bokeh>=2.0.0->streamlit-bokeh-events) (1.16.0)\n",
"Downloading streamlit_bokeh_events-0.1.2-py3-none-any.whl (2.0 MB)\n",
" ---------------------------------------- 0.0/2.0 MB ? eta -:--:--\n",
" ---------------------------------------- 0.0/2.0 MB ? eta -:--:--\n",
" ---------------------------------------- 0.0/2.0 MB ? eta -:--:--\n",
" ---------------------------------------- 0.0/2.0 MB ? eta -:--:--\n",
" ---------------------------------------- 0.0/2.0 MB ? eta -:--:--\n",
" ---------------------------------------- 0.0/2.0 MB 93.1 kB/s eta 0:00:21\n",
" --------------------------------------- 0.0/2.0 MB 108.9 kB/s eta 0:00:18\n",
" --------------------------------------- 0.0/2.0 MB 108.9 kB/s eta 0:00:18\n",
" --------------------------------------- 0.0/2.0 MB 108.9 kB/s eta 0:00:18\n",
" --------------------------------------- 0.0/2.0 MB 108.9 kB/s eta 0:00:18\n",
" --------------------------------------- 0.0/2.0 MB 85.3 kB/s eta 0:00:23\n",
" --------------------------------------- 0.0/2.0 MB 85.3 kB/s eta 0:00:23\n",
" - -------------------------------------- 0.1/2.0 MB 109.2 kB/s eta 0:00:18\n",
" - -------------------------------------- 0.1/2.0 MB 109.2 kB/s eta 0:00:18\n",
" - -------------------------------------- 0.1/2.0 MB 109.2 kB/s eta 0:00:18\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 120.7 kB/s eta 0:00:16\n",
" - -------------------------------------- 0.1/2.0 MB 64.7 kB/s eta 0:00:29\n",
" - -------------------------------------- 0.1/2.0 MB 64.7 kB/s eta 0:00:29\n",
" - -------------------------------------- 0.1/2.0 MB 64.7 kB/s eta 0:00:29\n",
" -- ------------------------------------- 0.1/2.0 MB 73.6 kB/s eta 0:00:26\n",
" -- ------------------------------------- 0.1/2.0 MB 73.6 kB/s eta 0:00:26\n",
" -- ------------------------------------- 0.1/2.0 MB 73.6 kB/s eta 0:00:26\n",
" -- ------------------------------------- 0.1/2.0 MB 72.1 kB/s eta 0:00:26\n",
" -- ------------------------------------- 0.1/2.0 MB 72.1 kB/s eta 0:00:26\n",
" -- ------------------------------------- 0.1/2.0 MB 72.1 kB/s eta 0:00:26\n",
" -- ------------------------------------- 0.1/2.0 MB 79.6 kB/s eta 0:00:23\n",
" -- ------------------------------------- 0.1/2.0 MB 79.6 kB/s eta 0:00:23\n",
" -- ------------------------------------- 0.1/2.0 MB 79.6 kB/s eta 0:00:23\n",
" --- ------------------------------------ 0.2/2.0 MB 84.0 kB/s eta 0:00:22\n",
" --- ------------------------------------ 0.2/2.0 MB 84.0 kB/s eta 0:00:22\n",
" --- ------------------------------------ 0.2/2.0 MB 83.9 kB/s eta 0:00:22\n",
" --- ------------------------------------ 0.2/2.0 MB 83.9 kB/s eta 0:00:22\n",
" --- ------------------------------------ 0.2/2.0 MB 88.7 kB/s eta 0:00:20\n",
" --- ------------------------------------ 0.2/2.0 MB 88.7 kB/s eta 0:00:20\n",
" --- ------------------------------------ 0.2/2.0 MB 88.7 kB/s eta 0:00:20\n",
" ---- ----------------------------------- 0.2/2.0 MB 88.9 kB/s eta 0:00:20\n",
" ---- ----------------------------------- 0.2/2.0 MB 88.9 kB/s eta 0:00:20\n",
" ---- ----------------------------------- 0.2/2.0 MB 93.6 kB/s eta 0:00:19\n",
" ---- ----------------------------------- 0.2/2.0 MB 93.6 kB/s eta 0:00:19\n",
" ----- ---------------------------------- 0.2/2.0 MB 97.8 kB/s eta 0:00:18\n",
" ----- ---------------------------------- 0.2/2.0 MB 97.8 kB/s eta 0:00:18\n",
" ----- ---------------------------------- 0.3/2.0 MB 98.3 kB/s eta 0:00:18\n",
" ----- ---------------------------------- 0.3/2.0 MB 98.3 kB/s eta 0:00:18\n",
" ----- ---------------------------------- 0.3/2.0 MB 102.6 kB/s eta 0:00:17\n",
" ----- ---------------------------------- 0.3/2.0 MB 102.6 kB/s eta 0:00:17\n",
" ----- ---------------------------------- 0.3/2.0 MB 102.3 kB/s eta 0:00:17\n",
" ----- ---------------------------------- 0.3/2.0 MB 102.3 kB/s eta 0:00:17\n",
" ------ --------------------------------- 0.3/2.0 MB 105.6 kB/s eta 0:00:16\n",
" ------ --------------------------------- 0.3/2.0 MB 105.6 kB/s eta 0:00:16\n",
" ------ --------------------------------- 0.3/2.0 MB 105.6 kB/s eta 0:00:16\n",
" ------ --------------------------------- 0.3/2.0 MB 108.6 kB/s eta 0:00:15\n",
" ------ --------------------------------- 0.3/2.0 MB 108.6 kB/s eta 0:00:15\n",
" ------ --------------------------------- 0.3/2.0 MB 108.1 kB/s eta 0:00:15\n",
" ------ --------------------------------- 0.3/2.0 MB 108.1 kB/s eta 0:00:15\n",
" ------ --------------------------------- 0.3/2.0 MB 108.1 kB/s eta 0:00:15\n",
" ------- -------------------------------- 0.4/2.0 MB 109.2 kB/s eta 0:00:15\n",
" ------- -------------------------------- 0.4/2.0 MB 109.2 kB/s eta 0:00:15\n",
" ------- -------------------------------- 0.4/2.0 MB 109.2 kB/s eta 0:00:15\n",
" ------- -------------------------------- 0.4/2.0 MB 109.2 kB/s eta 0:00:15\n",
" ------- -------------------------------- 0.4/2.0 MB 111.7 kB/s eta 0:00:15\n",
" ------- -------------------------------- 0.4/2.0 MB 111.7 kB/s eta 0:00:15\n",
" -------- ------------------------------- 0.4/2.0 MB 114.1 kB/s eta 0:00:14\n",
" -------- ------------------------------- 0.4/2.0 MB 114.1 kB/s eta 0:00:14\n",
" -------- ------------------------------- 0.4/2.0 MB 114.1 kB/s eta 0:00:14\n",
" -------- ------------------------------- 0.4/2.0 MB 113.5 kB/s eta 0:00:14\n",
" -------- ------------------------------- 0.4/2.0 MB 113.5 kB/s eta 0:00:14\n",
" --------- ------------------------------ 0.4/2.0 MB 116.1 kB/s eta 0:00:14\n",
" --------- ------------------------------ 0.4/2.0 MB 116.1 kB/s eta 0:00:14\n",
" --------- ------------------------------ 0.5/2.0 MB 115.5 kB/s eta 0:00:14\n",
" --------- ------------------------------ 0.5/2.0 MB 115.5 kB/s eta 0:00:14\n",
" --------- ------------------------------ 0.5/2.0 MB 115.5 kB/s eta 0:00:14\n",
" --------- ------------------------------ 0.5/2.0 MB 117.5 kB/s eta 0:00:13\n",
" --------- ------------------------------ 0.5/2.0 MB 117.5 kB/s eta 0:00:13\n",
" ---------- ----------------------------- 0.5/2.0 MB 118.9 kB/s eta 0:00:13\n",
" ---------- ----------------------------- 0.5/2.0 MB 118.9 kB/s eta 0:00:13\n",
" ---------- ----------------------------- 0.5/2.0 MB 118.7 kB/s eta 0:00:13\n",
" ---------- ----------------------------- 0.5/2.0 MB 118.7 kB/s eta 0:00:13\n",
" ---------- ----------------------------- 0.5/2.0 MB 118.7 kB/s eta 0:00:13\n",
" ---------- ----------------------------- 0.5/2.0 MB 119.6 kB/s eta 0:00:12\n",
" ---------- ----------------------------- 0.5/2.0 MB 119.6 kB/s eta 0:00:12\n",
" ---------- ----------------------------- 0.5/2.0 MB 119.6 kB/s eta 0:00:12\n",
" ---------- ----------------------------- 0.5/2.0 MB 118.9 kB/s eta 0:00:12\n",
" ---------- ----------------------------- 0.5/2.0 MB 118.9 kB/s eta 0:00:12\n",
" ----------- ---------------------------- 0.6/2.0 MB 120.2 kB/s eta 0:00:12\n",
" ----------- ---------------------------- 0.6/2.0 MB 120.2 kB/s eta 0:00:12\n",
" ----------- ---------------------------- 0.6/2.0 MB 120.2 kB/s eta 0:00:12\n",
" ----------- ---------------------------- 0.6/2.0 MB 121.8 kB/s eta 0:00:12\n",
" ----------- ---------------------------- 0.6/2.0 MB 121.8 kB/s eta 0:00:12\n",
" ----------- ---------------------------- 0.6/2.0 MB 120.7 kB/s eta 0:00:12\n",
" ----------- ---------------------------- 0.6/2.0 MB 120.7 kB/s eta 0:00:12\n",
" ----------- ---------------------------- 0.6/2.0 MB 120.7 kB/s eta 0:00:12\n",
" ------------ --------------------------- 0.6/2.0 MB 122.2 kB/s eta 0:00:12\n",
" ------------ --------------------------- 0.6/2.0 MB 122.2 kB/s eta 0:00:12\n",
" ------------ --------------------------- 0.6/2.0 MB 121.2 kB/s eta 0:00:12\n",
" ------------ --------------------------- 0.6/2.0 MB 121.2 kB/s eta 0:00:12\n",
" ------------ --------------------------- 0.6/2.0 MB 121.2 kB/s eta 0:00:12\n",
" ------------ --------------------------- 0.6/2.0 MB 121.2 kB/s eta 0:00:12\n",
" ------------ --------------------------- 0.6/2.0 MB 121.2 kB/s eta 0:00:12\n",
" ------------ --------------------------- 0.6/2.0 MB 120.8 kB/s eta 0:00:11\n",
" ------------ --------------------------- 0.6/2.0 MB 120.8 kB/s eta 0:00:11\n",
" ------------- -------------------------- 0.7/2.0 MB 122.1 kB/s eta 0:00:11\n",
" ------------- -------------------------- 0.7/2.0 MB 122.1 kB/s eta 0:00:11\n",
" ------------- -------------------------- 0.7/2.0 MB 122.1 kB/s eta 0:00:11\n",
" ------------- -------------------------- 0.7/2.0 MB 120.9 kB/s eta 0:00:11\n",
" ------------- -------------------------- 0.7/2.0 MB 120.9 kB/s eta 0:00:11\n",
" ------------- -------------------------- 0.7/2.0 MB 120.9 kB/s eta 0:00:11\n",
" -------------- ------------------------- 0.7/2.0 MB 121.8 kB/s eta 0:00:11\n",
" -------------- ------------------------- 0.7/2.0 MB 121.8 kB/s eta 0:00:11\n",
" -------------- ------------------------- 0.7/2.0 MB 121.3 kB/s eta 0:00:11\n",
" -------------- ------------------------- 0.7/2.0 MB 121.3 kB/s eta 0:00:11\n",
" -------------- ------------------------- 0.7/2.0 MB 122.9 kB/s eta 0:00:11\n",
" -------------- ------------------------- 0.7/2.0 MB 122.9 kB/s eta 0:00:11\n",
" --------------- ------------------------ 0.7/2.0 MB 124.1 kB/s eta 0:00:10\n",
" --------------- ------------------------ 0.7/2.0 MB 124.1 kB/s eta 0:00:10\n",
" --------------- ------------------------ 0.7/2.0 MB 124.1 kB/s eta 0:00:10\n",
" --------------- ------------------------ 0.7/2.0 MB 123.5 kB/s eta 0:00:10\n",
" --------------- ------------------------ 0.7/2.0 MB 123.5 kB/s eta 0:00:10\n",
" --------------- ------------------------ 0.8/2.0 MB 124.3 kB/s eta 0:00:10\n",
" --------------- ------------------------ 0.8/2.0 MB 124.3 kB/s eta 0:00:10\n",
" --------------- ------------------------ 0.8/2.0 MB 124.1 kB/s eta 0:00:10\n",
" --------------- ------------------------ 0.8/2.0 MB 124.1 kB/s eta 0:00:10\n",
" --------------- ------------------------ 0.8/2.0 MB 124.1 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 124.9 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 124.9 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 124.9 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 125.4 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 114.0 kB/s eta 0:00:10\n",
" ---------------- ----------------------- 0.8/2.0 MB 114.0 kB/s eta 0:00:10\n",
" ----------------- ---------------------- 0.8/2.0 MB 115.1 kB/s eta 0:00:10\n",
" ----------------- ---------------------- 0.8/2.0 MB 115.1 kB/s eta 0:00:10\n",
" ----------------- ---------------------- 0.9/2.0 MB 114.7 kB/s eta 0:00:10\n",
" ----------------- ---------------------- 0.9/2.0 MB 114.7 kB/s eta 0:00:10\n",
" ----------------- ---------------------- 0.9/2.0 MB 114.7 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 116.1 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 109.6 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 109.6 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 109.6 kB/s eta 0:00:10\n",
" ------------------ --------------------- 0.9/2.0 MB 109.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 0.9/2.0 MB 110.9 kB/s eta 0:00:10\n",
" ------------------- -------------------- 0.9/2.0 MB 110.9 kB/s eta 0:00:10\n",
" ------------------- -------------------- 0.9/2.0 MB 110.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 0.9/2.0 MB 110.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 0.9/2.0 MB 110.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 0.9/2.0 MB 110.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 0.9/2.0 MB 110.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 0.9/2.0 MB 110.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 0.9/2.0 MB 110.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 0.9/2.0 MB 110.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 1.0/2.0 MB 108.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 1.0/2.0 MB 108.6 kB/s eta 0:00:10\n",
" ------------------- -------------------- 1.0/2.0 MB 108.6 kB/s eta 0:00:10\n",
" -------------------- ------------------- 1.0/2.0 MB 109.2 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 109.2 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 109.0 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 109.0 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 109.0 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 109.0 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 109.0 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 109.0 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 109.0 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 109.0 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 107.2 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 107.2 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 107.2 kB/s eta 0:00:09\n",
" -------------------- ------------------- 1.0/2.0 MB 107.2 kB/s eta 0:00:09\n",
" --------------------- ------------------ 1.0/2.0 MB 108.0 kB/s eta 0:00:09\n",
" --------------------- ------------------ 1.0/2.0 MB 108.0 kB/s eta 0:00:09\n",
" --------------------- ------------------ 1.0/2.0 MB 108.0 kB/s eta 0:00:09\n",
" --------------------- ------------------ 1.1/2.0 MB 108.5 kB/s eta 0:00:09\n",
" --------------------- ------------------ 1.1/2.0 MB 108.5 kB/s eta 0:00:09\n",
" --------------------- ------------------ 1.1/2.0 MB 108.5 kB/s eta 0:00:09\n",
" --------------------- ------------------ 1.1/2.0 MB 108.5 kB/s eta 0:00:09\n",
" --------------------- ------------------ 1.1/2.0 MB 107.8 kB/s eta 0:00:09\n",
" --------------------- ------------------ 1.1/2.0 MB 107.8 kB/s eta 0:00:09\n",
" ---------------------- ----------------- 1.1/2.0 MB 108.5 kB/s eta 0:00:08\n",
" ---------------------- ----------------- 1.1/2.0 MB 108.5 kB/s eta 0:00:08\n",
" ---------------------- ----------------- 1.1/2.0 MB 108.5 kB/s eta 0:00:08\n",
" ---------------------- ----------------- 1.1/2.0 MB 108.0 kB/s eta 0:00:08\n",
" ---------------------- ----------------- 1.1/2.0 MB 108.0 kB/s eta 0:00:08\n",
" ---------------------- ----------------- 1.1/2.0 MB 108.0 kB/s eta 0:00:08\n",
" ----------------------- ---------------- 1.1/2.0 MB 108.9 kB/s eta 0:00:08\n",
" ----------------------- ---------------- 1.1/2.0 MB 108.9 kB/s eta 0:00:08\n",
" ----------------------- ---------------- 1.1/2.0 MB 108.9 kB/s eta 0:00:08\n",
" ----------------------- ---------------- 1.1/2.0 MB 109.4 kB/s eta 0:00:08\n",
" ----------------------- ---------------- 1.1/2.0 MB 109.4 kB/s eta 0:00:08\n",
" ----------------------- ---------------- 1.2/2.0 MB 109.2 kB/s eta 0:00:08\n",
" ----------------------- ---------------- 1.2/2.0 MB 109.2 kB/s eta 0:00:08\n",
" ----------------------- ---------------- 1.2/2.0 MB 109.2 kB/s eta 0:00:08\n",
" ------------------------ --------------- 1.2/2.0 MB 109.9 kB/s eta 0:00:08\n",
" ------------------------ --------------- 1.2/2.0 MB 109.9 kB/s eta 0:00:08\n",
" ------------------------ --------------- 1.2/2.0 MB 109.7 kB/s eta 0:00:08\n",
" ------------------------ --------------- 1.2/2.0 MB 109.7 kB/s eta 0:00:08\n",
" ------------------------ --------------- 1.2/2.0 MB 109.7 kB/s eta 0:00:08\n",
" ------------------------ --------------- 1.2/2.0 MB 110.3 kB/s eta 0:00:07\n",
" ------------------------ --------------- 1.2/2.0 MB 110.3 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.2/2.0 MB 111.1 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.2/2.0 MB 111.1 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.2/2.0 MB 111.1 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.2/2.0 MB 111.1 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.2/2.0 MB 110.1 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.2/2.0 MB 110.1 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.2/2.0 MB 110.1 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.3/2.0 MB 110.6 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.3/2.0 MB 110.6 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.3/2.0 MB 110.6 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.3/2.0 MB 110.3 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.3/2.0 MB 110.3 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.3/2.0 MB 110.3 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.3/2.0 MB 110.3 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.3/2.0 MB 110.3 kB/s eta 0:00:07\n",
" ------------------------- -------------- 1.3/2.0 MB 110.3 kB/s eta 0:00:07\n",
" -------------------------- ------------- 1.3/2.0 MB 109.4 kB/s eta 0:00:07\n",
" -------------------------- ------------- 1.3/2.0 MB 110.4 kB/s eta 0:00:06\n",
" -------------------------- ------------- 1.3/2.0 MB 110.4 kB/s eta 0:00:06\n",
" -------------------------- ------------- 1.3/2.0 MB 110.4 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.1 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.1 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.3/2.0 MB 110.8 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.4/2.0 MB 107.2 kB/s eta 0:00:06\n",
" --------------------------- ------------ 1.4/2.0 MB 107.2 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.1 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.1 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.7 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.7 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.7 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.6 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.6 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.6 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.6 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.6 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.6 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.6 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.6 kB/s eta 0:00:06\n",
" ---------------------------- ----------- 1.4/2.0 MB 108.6 kB/s eta 0:00:06\n",
" ----------------------------- ---------- 1.4/2.0 MB 106.3 kB/s eta 0:00:06\n",
" ----------------------------- ---------- 1.4/2.0 MB 106.3 kB/s eta 0:00:06\n",
" ----------------------------- ---------- 1.4/2.0 MB 106.4 kB/s eta 0:00:05\n",
" ----------------------------- ---------- 1.4/2.0 MB 106.4 kB/s eta 0:00:05\n",
" ----------------------------- ---------- 1.4/2.0 MB 106.4 kB/s eta 0:00:05\n",
" ----------------------------- ---------- 1.4/2.0 MB 106.4 kB/s eta 0:00:05\n",
" ----------------------------- ---------- 1.5/2.0 MB 106.2 kB/s eta 0:00:05\n",
" ----------------------------- ---------- 1.5/2.0 MB 106.2 kB/s eta 0:00:05\n",
" ----------------------------- ---------- 1.5/2.0 MB 106.2 kB/s eta 0:00:05\n",
" ------------------------------ --------- 1.5/2.0 MB 106.9 kB/s eta 0:00:05\n",
" ------------------------------ --------- 1.5/2.0 MB 106.9 kB/s eta 0:00:05\n",
" ------------------------------ --------- 1.5/2.0 MB 106.8 kB/s eta 0:00:05\n",
" ------------------------------ --------- 1.5/2.0 MB 106.8 kB/s eta 0:00:05\n",
" ------------------------------ --------- 1.5/2.0 MB 106.8 kB/s eta 0:00:05\n",
" ------------------------------ --------- 1.5/2.0 MB 107.4 kB/s eta 0:00:05\n",
" ------------------------------ --------- 1.5/2.0 MB 107.4 kB/s eta 0:00:05\n",
" ------------------------------ --------- 1.5/2.0 MB 107.4 kB/s eta 0:00:05\n",
" ------------------------------ --------- 1.5/2.0 MB 107.4 kB/s eta 0:00:05\n",
" ------------------------------ --------- 1.5/2.0 MB 107.4 kB/s eta 0:00:05\n",
" ------------------------------- -------- 1.5/2.0 MB 107.7 kB/s eta 0:00:04\n",
" ------------------------------- -------- 1.5/2.0 MB 107.7 kB/s eta 0:00:04\n",
" ------------------------------- -------- 1.6/2.0 MB 108.3 kB/s eta 0:00:04\n",
" ------------------------------- -------- 1.6/2.0 MB 108.3 kB/s eta 0:00:04\n",
" -------------------------------- ------- 1.6/2.0 MB 108.3 kB/s eta 0:00:04\n",
" -------------------------------- ------- 1.6/2.0 MB 108.3 kB/s eta 0:00:04\n",
" -------------------------------- ------- 1.6/2.0 MB 108.3 kB/s eta 0:00:04\n",
" -------------------------------- ------- 1.6/2.0 MB 108.9 kB/s eta 0:00:04\n",
" -------------------------------- ------- 1.6/2.0 MB 108.9 kB/s eta 0:00:04\n",
" -------------------------------- ------- 1.6/2.0 MB 108.8 kB/s eta 0:00:04\n",
" -------------------------------- ------- 1.6/2.0 MB 108.8 kB/s eta 0:00:04\n",
" --------------------------------- ------ 1.6/2.0 MB 109.3 kB/s eta 0:00:04\n",
" --------------------------------- ------ 1.6/2.0 MB 109.3 kB/s eta 0:00:04\n",
" --------------------------------- ------ 1.6/2.0 MB 109.3 kB/s eta 0:00:04\n",
" --------------------------------- ------ 1.6/2.0 MB 109.8 kB/s eta 0:00:03\n",
" --------------------------------- ------ 1.6/2.0 MB 109.8 kB/s eta 0:00:03\n",
" --------------------------------- ------ 1.6/2.0 MB 109.8 kB/s eta 0:00:03\n",
" --------------------------------- ------ 1.6/2.0 MB 109.8 kB/s eta 0:00:03\n",
" --------------------------------- ------ 1.6/2.0 MB 109.8 kB/s eta 0:00:03\n",
" ---------------------------------- ----- 1.7/2.0 MB 110.1 kB/s eta 0:00:03\n",
" ---------------------------------- ----- 1.7/2.0 MB 110.1 kB/s eta 0:00:03\n",
" ---------------------------------- ----- 1.7/2.0 MB 110.2 kB/s eta 0:00:03\n",
" ---------------------------------- ----- 1.7/2.0 MB 110.2 kB/s eta 0:00:03\n",
" ---------------------------------- ----- 1.7/2.0 MB 110.9 kB/s eta 0:00:03\n",
" ---------------------------------- ----- 1.7/2.0 MB 110.9 kB/s eta 0:00:03\n",
" ---------------------------------- ----- 1.7/2.0 MB 110.9 kB/s eta 0:00:03\n",
" ----------------------------------- ---- 1.7/2.0 MB 111.1 kB/s eta 0:00:03\n",
" ----------------------------------- ---- 1.7/2.0 MB 111.1 kB/s eta 0:00:03\n",
" ----------------------------------- ---- 1.7/2.0 MB 111.1 kB/s eta 0:00:03\n",
" ----------------------------------- ---- 1.7/2.0 MB 111.1 kB/s eta 0:00:03\n",
" ----------------------------------- ---- 1.7/2.0 MB 111.1 kB/s eta 0:00:03\n",
" ----------------------------------- ---- 1.8/2.0 MB 111.5 kB/s eta 0:00:02\n",
" ----------------------------------- ---- 1.8/2.0 MB 111.5 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 111.2 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 111.2 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 111.2 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 111.2 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 111.2 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 111.2 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 111.2 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 111.2 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 110.0 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 110.0 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 110.0 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 110.5 kB/s eta 0:00:02\n",
" ------------------------------------ --- 1.8/2.0 MB 110.5 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 110.3 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 110.3 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 110.3 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 110.8 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 110.8 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 110.8 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 110.8 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 110.8 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 110.8 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 110.8 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 109.2 kB/s eta 0:00:02\n",
" ------------------------------------- -- 1.8/2.0 MB 109.2 kB/s eta 0:00:02\n",
" -------------------------------------- - 1.9/2.0 MB 109.8 kB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 109.8 kB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 110.2 kB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 110.2 kB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 110.2 kB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 110.1 kB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 110.1 kB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 110.1 kB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 110.1 kB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 110.1 kB/s eta 0:00:01\n",
" -------------------------------------- - 1.9/2.0 MB 110.1 kB/s eta 0:00:01\n",
" --------------------------------------- 1.9/2.0 MB 109.4 kB/s eta 0:00:01\n",
" --------------------------------------- 1.9/2.0 MB 109.4 kB/s eta 0:00:01\n",
" --------------------------------------- 1.9/2.0 MB 109.4 kB/s eta 0:00:01\n",
" --------------------------------------- 1.9/2.0 MB 109.1 kB/s eta 0:00:01\n",
" --------------------------------------- 1.9/2.0 MB 109.1 kB/s eta 0:00:01\n",
" --------------------------------------- 1.9/2.0 MB 109.1 kB/s eta 0:00:01\n",
" --------------------------------------- 1.9/2.0 MB 109.1 kB/s eta 0:00:01\n",
" --------------------------------------- 2.0/2.0 MB 109.7 kB/s eta 0:00:01\n",
" ---------------------------------------- 2.0/2.0 MB 109.4 kB/s eta 0:00:00\n",
"Installing collected packages: streamlit-bokeh-events\n",
"Successfully installed streamlit-bokeh-events-0.1.2\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"pip install streamlit-bokeh-events"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2024-10-30 10:52:39.204 WARNING streamlit.runtime.scriptrunner_utils.script_run_context: Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n",
"2024-10-30 10:52:39.276 WARNING streamlit.runtime.scriptrunner_utils.script_run_context: Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n",
"2024-10-30 10:52:39.277 WARNING streamlit.runtime.scriptrunner_utils.script_run_context: Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n",
"2024-10-30 10:52:39.278 WARNING streamlit.runtime.scriptrunner_utils.script_run_context: Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n",
"2024-10-30 10:52:39.371 \n",
" \u001b[33m\u001b[1mWarning:\u001b[0m to view this Streamlit app on a browser, run it with the following\n",
" command:\n",
"\n",
" streamlit run c:\\Users\\umesh\\anaconda3\\envs\\DeepLearning\\lib\\site-packages\\ipykernel_launcher.py [ARGUMENTS]\n",
"2024-10-30 10:52:39.372 Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.\n"
]
}
],
"source": [
"import streamlit as st\n",
"from bokeh.models.widgets import Button\n",
"from bokeh.models import CustomJS\n",
"from streamlit_bokeh_events import streamlit_bokeh_events\n",
"\n",
"stt_button = Button(label=\"Speak\", width=100)\n",
"\n",
"stt_button.js_on_event(\"button_click\", CustomJS(code=\"\"\"\n",
" var recognition = new webkitSpeechRecognition();\n",
" recognition.continuous = true;\n",
" recognition.interimResults = true;\n",
" \n",
" recognition.onresult = function (e) {\n",
" var value = \"\";\n",
" for (var i = e.resultIndex; i < e.results.length; ++i) {\n",
" if (e.results[i].isFinal) {\n",
" value += e.results[i][0].transcript;\n",
" }\n",
" }\n",
" if ( value != \"\") {\n",
" document.dispatchEvent(new CustomEvent(\"GET_TEXT\", {detail: value}));\n",
" }\n",
" }\n",
" recognition.start();\n",
" \"\"\"))\n",
"\n",
"result = streamlit_bokeh_events(\n",
" stt_button,\n",
" events=\"GET_TEXT\",\n",
" key=\"listen\",\n",
" refresh_on_update=False,\n",
" override_height=75,\n",
" debounce_time=0)\n",
"\n",
"if result:\n",
" if \"GET_TEXT\" in result:\n",
" st.write(result.get(\"GET_TEXT\"))"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: pyzmq in c:\\users\\umesh\\anaconda3\\envs\\deeplearning\\lib\\site-packages (23.2.0)\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"pip install pyzmq"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "DeepLearning",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
}