From be43bcf4e2cae0bce0a8d86d04f7af8026eba8b4 Mon Sep 17 00:00:00 2001 From: bagussatoto Date: Mon, 1 Jan 2024 11:02:50 +0700 Subject: [PATCH] first commit --- deploy/content/satoto_ai.py | 6 +-- deploy/satoto_ai.ipynb | 100 ++++++++++++++++++------------------ 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/deploy/content/satoto_ai.py b/deploy/content/satoto_ai.py index 3c42a6b..60f1dab 100644 --- a/deploy/content/satoto_ai.py +++ b/deploy/content/satoto_ai.py @@ -23,9 +23,9 @@ import pywhatkit import wikipedia listener = sr.Recognizer() -alexa = pyttsx3.init() +satoto = pyttsx3.init() -voices = alexa.getProperty('voices') +voices = satoto.getProperty('voices') alexa.setProperty('voice', voices[0].id) def talk(text): @@ -36,7 +36,7 @@ def take_command(): try: with sr.Microphone() as source: - print('Alexa is listening, please speak...') + print('Satoto.ai is listening, please speak...') voice = listener.listen(source) command = listener.recognize_google(voice) command = command.lower() diff --git a/deploy/satoto_ai.ipynb b/deploy/satoto_ai.ipynb index 912de60..b7dff91 100644 --- a/deploy/satoto_ai.ipynb +++ b/deploy/satoto_ai.ipynb @@ -1,36 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } - }, "cells": [ { "cell_type": "code", + "execution_count": null, "metadata": { - "id": "hDyC6RPHiRO7", "colab": { "base_uri": "https://localhost:8080/" }, + "id": "hDyC6RPHiRO7", "outputId": "03ea3cd4-12d2-4e1e-d2fd-d99f34a43029" }, - "source": [ - "pip install SpeechRecognition" - ], - "execution_count": null, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "Collecting SpeechRecognition\n", " Downloading SpeechRecognition-3.10.1-py2.py3-none-any.whl (32.8 MB)\n", @@ -45,25 +28,25 @@ "Successfully installed SpeechRecognition-3.10.1\n" ] } + ], + "source": [ + "pip install SpeechRecognition" ] }, { "cell_type": "code", + "execution_count": null, "metadata": { - "id": "OmxPM1eqiZvj", "colab": { "base_uri": "https://localhost:8080/" }, + "id": "OmxPM1eqiZvj", "outputId": "c09a8961-b7a4-4443-e467-252555a4e72f" }, - "source": [ - "pip install pyttsx3" - ], - "execution_count": null, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "Collecting pyttsx3\n", " Downloading pyttsx3-2.90-py3-none-any.whl (39 kB)\n", @@ -71,36 +54,36 @@ "Successfully installed pyttsx3-2.90\n" ] } + ], + "source": [ + "pip install pyttsx3" ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "noTfcWENiZ4C" }, + "outputs": [], "source": [ "conda install -c anaconda pyaudio" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { - "id": "3hBf-rCwiZ-f", "colab": { "base_uri": "https://localhost:8080/" }, + "id": "3hBf-rCwiZ-f", "outputId": "a4cb754b-48d7-42da-8651-71278e8399fa" }, - "source": [ - "pip install pywhatkit" - ], - "execution_count": null, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "Collecting pywhatkit\n", " Downloading pywhatkit-5.4-py3-none-any.whl (15 kB)\n", @@ -188,25 +171,25 @@ "Successfully installed mouseinfo-0.1.3 pyautogui-0.9.54 pygetwindow-0.0.9 pymsgbox-1.0.9 pyrect-0.2.0 pyscreeze-0.1.30 python3-Xlib-0.15 pytweening-1.0.7 pywhatkit-5.4 wikipedia-1.4.0\n" ] } + ], + "source": [ + "pip install pywhatkit" ] }, { "cell_type": "code", + "execution_count": null, "metadata": { - "id": "CQSgpTROil3z", "colab": { "base_uri": "https://localhost:8080/" }, + "id": "CQSgpTROil3z", "outputId": "f6250a8d-512f-4a2e-8427-0273170e9db7" }, - "source": [ - "pip install wikipedia" - ], - "execution_count": null, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "Requirement already satisfied: wikipedia in /usr/local/lib/python3.10/dist-packages (1.4.0)\n", "Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.10/dist-packages (from wikipedia) (4.11.2)\n", @@ -218,10 +201,18 @@ "Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.10/dist-packages (from beautifulsoup4->wikipedia) (2.5)\n" ] } + ], + "source": [ + "pip install wikipedia" ] }, { "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "TVFJ4EvUNUz0" + }, + "outputs": [], "source": [ "import speech_recognition as sr\n", "import pyttsx3\n", @@ -242,7 +233,7 @@ "\n", " try:\n", " with sr.Microphone() as source:\n", - " print('Alexa is listening, please speak...')\n", + " print('Satoto.ai is listening, please speak...')\n", " voice = listener.listen(source)\n", " command = listener.recognize_google(voice)\n", " command = command.lower()\n", @@ -274,12 +265,21 @@ "\n", "\n", "run_alexa()" - ], - "metadata": { - "id": "TVFJ4EvUNUz0" - }, - "execution_count": null, - "outputs": [] + ] } - ] -} \ No newline at end of file + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +}