In Bayesian inference, the likelihood functions are evaluated thousands of times. In this paper we explore the use of an Artificial Neural Network to learn how to calculate the likelihood function and thus speed up the Bayesian inference process. We test the performance of the neural network on a parameter estimation of the standard cosmological model and show that this method can reduce the computational time.