AI is one of the most significant trends in the app development industry. We can witness that artificial intelligence is coursing into every regular activity of ours whether it is medicine, finance, production, cyber security through mobile and desktop applications.
In this article, you will learn how to transform your Windows development as well as that of other desktops such macOS or Linux, or for mobile applications by harnessing the power of artificial intelligence using Embarcadero’s Delphi FireMonkey technology. Artificial intelligence empowers you and your business to achieve more by providing intelligent solutions to complex problems.
Delphi is a strongly typed, event-driven programming language with a rich ecosystem of frameworks and components. With the Delphi FireMonkey framework, you can build native and cross-platform applications from a single code base, and you can easily target:
Table of Contents
Should I use AI in my Windows and mobile apps?
There is a trend in Microsoft Windows desktop applications towards using AI. For instance, the Cortana visual assistant can improve and become more helpful over time if you use it. Moreover, the Microsoft Office applications can learn what you do and give recommendations and fixes to your document. The Outlook email and calendar management app has recently incorporated some great use of machine learning to send out an innovative summary of tasks on which you have promised a follow-up.
It’s becoming obvious that you should definitely consider using machine learning and AI in your apps to add powerful and innovative additional functionality.
Microsoft also provides Cognitive Services that allow AI, specifically machine learning, algorithms to be deployed on the powerful and popular Azure cloud computing. You can easily connect your Delphi FireMonkey apps to these cognitive services.
By using cloud-provided AI APIs, you can spend more time building your business logic rather than creating the needed service from scratch.
1. Use Google Cloud AI APIs
Google offers a variety of AI APIs that you can easily connect to Google’s online services and accomplish machine learning tasks in the cloud and fetch the data using REST endpoints. For instance, Google Document AI API is one such service which provides the ability to parse structured information from unstructured or semi-structured documents using state-of-the-art Google AI such as natural language, computer vision, translation, and AutoML.
Google Vision AI API is another set of services that you can utilize to detect objects or extract text from the document with world-class accuracy. Here you can check out this tutorial which shows you how to deploy powerful AI vision tools on Windows and Mobile.
2. Integrate APILayer AI APIs
APILayer is one of the market-leading services that offer a wide variety of productivity-boosting Web APIs, cloud-based micro-service applications for developers and companies of any size.
LanguageLayer is part of the APILayer set, and it provides powerful language detection AI API. It supports 173 languages and you can access this service via REST API. Here is a tutorial where you can learn how to integrate this LanguageLayer API into your Delphi FireMonkey application.
3. Integrate DeepAI APIs
You can integrate DeepAI APIs into your Delphi applications. So, you can use DeepAI API to process images and videos to get data about the demographics of people present, faces detected. Moreover, you even flag media that contains nudity so you can remove it from within your online community.
- Image Recognition APIs
- Facial, celebrity, facial expression, image colorization, neural style, and many more
- Text Analysis APIs
- Sentiment analysis, text tagging, text summarization
- Video Recognition API
We have a tutorial that shows how to integrate this DeepAI API into your Delphi FireMonkey application using the REST Client library.
This is the project described in the tutorial. Be sure to check it out:
Besides this, there is an article where you can learn how to integrate DeepAI’s Super Resolution API that super scales images. This API uses machine learning to clean, sharpen, and upscale photos without losing the original content. It can correct blurry images to a quite acceptable level.
4. Build a Modern AI Chatbot into your Desktop and mobile application
Natural language processing (NLP) is a branch of artificial intelligence that allows computers to comprehend, interpret and manipulate human language. NLP pulls from many disciplines, including computer science and computational linguistics, in its pursuit to fill the gap between human communication and computer understanding.
Wit.ai is an open NLP engine for developers. It allows you to build human-like conversational applications. Wit.ai provides an easy interface and API allowing our apps to understand human conversation from interactions, parsing the message into data we can then act on.
You can easily create a new app, and you can enter a set of messages that a user would type, and you need to train it to understand the intent.
5. Utilize Python AI libraries in your Delphi Apps
Python for Delphi – P4D is a set of free components that wrap up the Python DLL into Delphi. They let you easily execute Python scripts, create new Python modules and new Python types.
- Low-level access to the Python APIs
- High-level-bi-directional interaction with Python
- Wrapping of Delphi objects use in Python scripts using RTTI
- Access to Python objects and more
By this, you can easily integrate all the libraries and frameworks available in Python using your Delphi VCL and FireMonkey applications.
This means you can access some of the popular AI libraries through Python for Delphi-free components. Check out these tutorials to learn more:
- Learn To Build A Python GUI For Solving Complex Tasks With Powerful OpenCV Library In A Delphi Windows App
- Learn To Build A Python GUI For Processing Images With Pillow Library In A Delphi Windows App
Check out this webinar to learn about Artificial Intelligence Development that covers: Working with OpenAI’s GPT-3
Why not try some of the examples yourself by downloading a free trail of Delphi today?