D.I.Y.
Unethical AI
If you insult it,
It is gonna make you cry.
This is a school project using which everyone will be able to create their very own personal AI. All it requires is a few hundred lines of Q&A training data and a Microsoft Azure account (used for TTS* and STT). Generated answers are not in any way creative as the AI is based on comparing sentence similarities and reading out matched question's answer. This project has a Speech-to-Text integration using which you will be able to hook up the AI to almost any online meeting software for people to converse with.
*It is also possible to pre-record your own TTS answers using a custom voice.
/AnswerGeneration
- Project responsible for generating answers to given questions./data
- Primary data store directory (QA file, audio recordings and cache)./Engine
- Main project which wraps everything together./misc
- Miscalenous files used during the school presentation./VoiceRecorder
- Project used for quick recording of voice samples.
- Prepare your Microsoft Azure account with Cognitive Services installed (available for free for limited use).
- Create
/Engine/.env
file and define yourAZURE_KEY
andAZURE_REGION
environment variables there. Values of both of those variables are dependant on your Cognitive Services installation. - Inside the
get_wav_path(...)
function in theEngine
project update the audio cache directory path. Ensure that the directory has write permissions. Whenever there is no corresponding audio file found, an Azure TTS will be generated. To use a custom voice instead, simply populate the cache withVoiceRecorder
recording files. - Done, you are now ready to run the project - have fun.
-
Import of the
AnswerGeneration
module inside theEngine
project requires some trickery withPATH
environment variable. Simple project restructure will solve that problem, however, I did not bother with fixing that. -
Generating an Azure TTS may sometimes fail whenever doing a coldstart (timeout issue). Processing the same sentence for the second time will most likely generate a proper TTS audio file.
-
The
Engine
project is using system's default audio in/out devices. That's not an ideal solution as you have to manually route your audio using virtual cables. I had some problem with getting custom devices to work on the Azure side as it requires you to provide devices in system-dependent device endpoint format. The other solution is to usePullAudioInputStreamCallback
but I could not get it to work. I just did not want to spend any more time on fixing that, sorry.
- Email: kamil@monicz.pl
- PGP: 0x9D7BC5B97BB0A707