Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bagussatoto committed Jan 1, 2024
1 parent a7dcbc0 commit be43bcf
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 53 deletions.
6 changes: 3 additions & 3 deletions deploy/content/satoto_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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()
Expand Down
100 changes: 50 additions & 50 deletions deploy/satoto_ai.ipynb
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -45,62 +28,62 @@
"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",
"Installing collected packages: pyttsx3\n",
"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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -274,12 +265,21 @@
"\n",
"\n",
"run_alexa()"
],
"metadata": {
"id": "TVFJ4EvUNUz0"
},
"execution_count": null,
"outputs": []
]
}
]
}
],
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}

0 comments on commit be43bcf

Please sign in to comment.