This is impossible in principle, at least in the form that you asked. A modified version of the task might be possible. The main reason is that the input would be an acoustic waveform, which needs to be parsed into discrete segmental chunks, then labeled according to a standard. The letters and articulatory descriptions are standardized and easily accessible, but the acoustic values are "endangered", in the sense that there is only a small set of available expert performances that could serve as the basis for acoustic categorization.
One solution is to devise a trained system where a linguist intervenes and provides labeling of a set of recordings in the language, thus you tell the system that a particular vowel is IPA [ɪ] and not [e]. This presupposes that the linguist has been properly trained in auditory phonetics and can make that judgement in a manner that comports with the judgments of the classical UCL-Edinburgh community. Since most of those experts are now deceased, that would be a problem. Another remote possibility is that there is a trove of expert recordings on tape, in a box in an attic. In searching for expert performances, you should avoid non-expert performances and also stay within a standard (which excludes the Smalley tapes, exemplifying the Smalley standard).
Apart from the dearth of standardized reference values, it is essential to recognize that the auditory referent of IPA letters is a range, and not a single triple of formants. If you have experience with a range of languages, especially pharyngeals, you can compare this (my go-to expert performance page) with exemplars in a particular language (Arabic, Somali, Kalispel, Agul, Chechen, Tigrinya, Berber). The letters [ʕa, ħa, ʡa, ʢa] under the standard are different from how they appear in specific languages that manifest them. Thus "standard" [ʕa] doesn't sound the same as Arabic [ʕa], but Arabic [ʕ] sounds more like standard [ʕa] than it sounds like anything else. A problem is that, for example, Tigrinya "ʕa" is auditorily equidistant between reference performance [ʔa], [ʕa] and [ʢa]. This is a ubiquitous problem in vowels, that a certain vowel might be slotted as [i,ɪ,e] based just on hearing.
In the real world, IPA transcriptions are the result of repeated exposure and analysis, which removes quasi-random details, as well as superfluous details. The syllable /geʕ/ is Tigrinya is pronounced at least a dozen transcribably-different ways using nano-transcriptional notations, with at least two patterns of laryngealized voice, stuff at the end corresponding to a final consonant, spirantization of g, credibly-different vowel qualities (more tense or not). Ultimately, the linguist has to develop a theory of the phonology of the language and has to decide what the phonemes are. But phonemes are the product of distributional analysis of actual sounds, so until you know the phonemes of a language, you can't just write the phonemes. Indeed, there is a huge problem in descriptive linguistics that people tend to think they know what the phonemes are, then they ignore rare counterexamples like l appearing where r is predicted, or they reduce the vowels to /i u a ə/ and ignore [e o] that appear where they shouldn't (e.g. [tebo] "table" in Lushootseed, spelled tibu).
If one can devise an incremental knowledge system where the first-pass product is a rough approximation, which feeds into a system that handled repeated utterances and contextual variants (i.e. paradigms), eventually devising a phonological analysis, then I think one could maybe come up with a computational system that does what a trained linguist does (or should do). Usually, though, you pick a language, throw millions of lines of data at it, and let the system extract statistical generalizations. At present, you need a trained human front end.