shakedzy / companion Goto Github PK
View Code? Open in Web Editor NEWGenerative-AI-Powered Foreign-Language Private Tutor
Home Page: http://shakedzy.xyz/companion/
License: Other
Generative-AI-Powered Foreign-Language Private Tutor
Home Page: http://shakedzy.xyz/companion/
License: Other
Currently, the tutor is only aware of the language taught and spoken (dialect are solely used for Google TTS service). Making it more aware of the dialects might enhance the lessons.
Currently there is no error handling, and the code assumes everything just works. Here are some suggestions:
See new API release notes: openai/openai-python#742
When alt+r are pressed, recording mode toggles. But it doesn't happen when the focus is on the text box.
Instead of configuring the app with a yaml file, add a new "init" page to select languages, voice and tutor.
Probably best handles once #2 is done
Audio files are generated, but no sound is heard. Might be due to bas installation of PyAudio or another dependency.
New lines (\n
) are not displayed in chat messages, which sometime cause the tutor messages to look odd.
When testing new voices in /setup
page, the engine is using the already-configured voice, which causes malfunctions in certain languages.
This can be converted to a Streamlit app, which can run online.
Another "welcome" page will have to be added, to ask the user for his API tokens.
Looking at split_to_sentences
, this phrase:
Très bien! Vous avez bien formé la négation en utilisant \"ne...pas\". Maintenant, pouvez-vous me donner la forme interrogative de la phrase \"il parle espagnol\"?
Splits to:
['Très bien',
' Vous avez bien formé la négation en utilisant "ne',
'',
'',
'pas"',
' Maintenant, pouvez-vous me donner la forme interrogative de la phrase "il parle espagnol"',
'']
while it should be:
['Très bien',
'Vous avez bien formé la négation en utilisant "ne...pas"',
'Maintenant, pouvez-vous me donner la forme interrogative de la phrase "il parle espagnol"?']
It'll be great to have the option to load previous chats and continue them
This might spice up the lessons, as it will allow discussion on current events
I got this error for the first time on my mac
Was fixed by brew insstall pyaudio
I just thought you might want to add it to your README or something.
ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects
of Google TTS will work better, it will reduce the number of services required.
See Google TTS Console here
If a user sends a message in his native language, allow to translate it to the learning language
When the tutor provides an assignment, for example:
Hier, nous (faire) ____________ une promenade dans le parc.
The underscores are read one by one ("underscore, underscore, underscore, ..."). Saying "underscore" or perhaps "mmm" should be the right thing.
Probably best handled once #2 is done
This is in order to allow running companion on a remote server and access it via mobile
Allow playing audio to be stopped or paused.
It would feel more realistic if the tutor speaks first
It'll be easier to read
When correcting or explaining, tutor might not ask further question, ending the session flow. for example:
Non, la forme interrogative correcte pour cette phrase serait "Aimons-nous le chocolat?" (avec le verbe "aimer" conjugué avant le sujet "nous").
Instead of creating config file, create a page which assists the user to configure the app, and create the config file behind the scene.
As can be seen from the following memory snippet:
{
"role": "assistant",
"content": "Bonjour Shaked! Comment ça va? Pour notre leçon aujourd'hui, je vous propose trois sujets qui conviennent à votre niveau DELF A1.2: \n1. Les verbes réguliers au présent \n2. Les articles définis et indéfinis \n3. Les adjectifs possessifs. \nQu'est-ce que vous préférez?",
"recording": [
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_0.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_1.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_2.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_3.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_4.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_5.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_6.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_7.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_8.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_9.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_10.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_11.mp3"
],
"user_recording": null
},
{
"role": "user",
"content": "Et Je choisi les verbe réguliers.",
"recording": [
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_0.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_1.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_2.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_3.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_4.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_5.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_6.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_7.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_8.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_9.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_10.mp3",
"/Users/shakedzy/repos/companion/tmp/bot_speech_1_11.mp3"
],
"user_recording": "/Users/shakedzy/repos/companion/tmp/user_recording_2.mp3"
},
Current authentication to Google is done by installing the APK and authenticating through it. This will not be possible when running as an app on Streamlit
For #13 (select tutor from an init page, more tutor profile pictures are required. Probably 3 females and 3 males should be sufficient). Currently only a single female profile exist.
Should be created with DALL-E/Midjourney.
Understand and explain how to install prerequisites on Windows
There are no docstrings in the code
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.