Convert PDF File Text to Audio Speech using Python and Google gTTS API

Introduction We are going to show you how to extract text from PDF file and convert them into audio speech using Google gTTS API. gTTS (Google Text-to-Speech), a Python library and CLI tool to interface with Google Translate’s text-to-speech API. Write spoken mp3 data to a file, a file-like object (bytestring) for further audio manipulation, or stdout.

Extract Text from PDF File using Python

Introduction We will create an example using Python programming language how to extract text from PDF file. In this example we are going to use PyPDF2 package from Python to work with PDF file.

Spring Centralized Runtime Properties Configuration without refreshing the Client

Introduction This tutorial walks you through the process of consuming the configurations from the Spring cloud config server. So I will setup a config server and build a client application consumes the configuration on startup and then refreshes the configuration without restarting the client. Let’s say you have some configuration values, in application properties or yaml/yml files, which may be…

How to insert CSV data into MySQL database using Python in different ways

Introduction This example will show you how to insert CSV data into MySQL database table directly. So I am going to create insert SQL statement for inserting data individually or I will also load the csv data directly into the MySQL table. CSV means Comma Separated Value, so it’s a plain text data. Each line of the file is data…

Write random elements to div having class names from array using JavaScript

This is an example where I am going to show you how to write random elements to div having class names from array using JavaScript. Let’s consider we have multiple div tags on a web page and these div tags are created dynamically based on certain condition but you are not sure how many div tags will be created on…

How to connect to MySQL database using Python in different ways

Here we will see how to connect to MySQL database server using Python in different ways. We need to install mysql-connector-python module to connect to MySQL database from Python programming language. We will create the connection objects in different ways and using this connection object we will be able to connect to MySQL server.

How to convert XML to CSV using Python

In this example you are going to see how you can convert XML data into CSV data. XML is an Extensible Markup Language and CSV is Comma Separated Values. In this example I am going to read both XML file and XML string and show you how to display the converted csv string data in console as well as in…

How to convert CSV to XML using Python

Introduction Here I am going to create an example on how to convert CSV to XML. CSV means Comma Separated Value. So the sources of these values may be different. These values may be put into a file or in a string. XML is an Extensible Markup Language that defines a set of rules for encoding document in a format…

How to read CSV file or string using Python

Introduction In this example I am going to show you how to read CSV file or string using Python programming language. You may come across a situation where you need to read CSV string or CSV file and manipulated data for any further business process. CSV means Comma Separated Values and the source of these values may be a file…

How To Read CSV File Using Java

Introduction In this tutorial I will show you how to read CSV file using Java 7 or later versions. I will use here Java’s new feature Path API. I will also use Java 8’s Stream API to split the comma separated line and map the record into String array. I am going to show you how to read file content…