Here, we study the problem of decoding information transmitted through unknown quantum states. We assume that Alice encodes an alphabet into a set of orthogonal quantum states, which are then transmitted to Bob. However, the quantum channel that mediates the transmission maps the orthogonal states into non-orthogonal states, possibly mixed. If an accurate model of the channel is unavailable, then the states received by Bob are unknown. In order to decode the transmitted information we propose to train a measurement device to achieve the smallest possible error in the discrimination process. This is achieved by supplementing the quantum channel with a classical one, which allows the transmission of information required for the training, and resorting to a noise-tolerant optimization algorithm. We demonstrate the training method in the case of minimum-error discrimination strategy and show that it achieves error probabilities very close to the optimal one. In particular, in the case of two unknown pure states, our proposal approaches the Helstrom bound. A similar result holds for a larger number of states in higher dimensions. We also show that a reduction of the search space, which is used in the training process, leads to a considerable reduction in the required resources. Finally, we apply our proposal to the case of the phase flip channel reaching an accurate value of the optimal error probability.