The problem of the approximation of the optimal filter for non-linear/non-Gaussian state-space models is considered in this paper. This problem is studied for models with a multi-dimensional (continuous) state space and one-dimensional (continuous) observation space. An approximation of the optimal filter based on quantization is proposed. We quantize both the state and observation processes to obtain a hidden Markov model with discrete state and observation spaces for which the optimal filter can be computed exactly. The problem of the optimal selection of the parameters of this approximating model (quantization thresholds, states, transition probabilities, likelihood probabilities) is considered. An algorithm based on Monte Carlo gradient estimation and stochastic approximation is proposed. The asymptotic properties of the proposed algorithm are analyzed and sufficient conditions for its convergence are also obtained.