Blog

14 juillet 2019 · Speech-to-text · Colab

Funny Games

A broken podcast link, more than 1,400 episodes of a French philosophy programme and a speech-to-text bill of over €2,000. A short note on searching audio archives by machine transcription, and on when not to.

Article en anglais.

Medusa, Caravaggio

The fourth part was missing. France Culture's Les Nouveaux Chemins de la connaissance had devoted a series of four programmes to the films of Michael Haneke, and I listened to them on a bike trip through Brittany. The last one, a reading of La Pianiste, was not where it should have been: the feed served a different episode in its place.

The obvious fix was to search the whole archive for it. Searching audio means turning it into text first, so this became a small experiment in machine transcription of French speech.

The pipeline

  • Collect. The programme's archive listed more than 1,400 episodes going back to 2010. A Google Colab notebook downloaded each MP3 into cloud storage.
  • Convert. Each file was converted to mono WAV, the format the transcription service expects.
  • Transcribe. In mid-2019, Mozilla's open-source DeepSpeech had no pretrained French model, so the notebook used Google Cloud Speech-to-Text (the v1p1beta1 API) with the fr-FR model and speaker diarization set to two speakers. Diarization labels who is speaking, so an interview comes back as a dialogue rather than a single block of text.

What worked, and what it would have cost

On the episodes tested, the French transcription was good, and it recognised the names of actors correctly, which is what a search for one film's episode depends on.

Cost ended the experiment. At the per-minute rates of the time, transcribing the whole archive would have cost more than €2,000. For one missing hour of radio, that was out of proportion: watching La Pianiste again was the cheaper way to find out what the episode would have said.

The lesson

Machine transcription made a spoken archive searchable, and in French, with speaker labels. Its price, charged by the minute of audio, scales with the size of the archive, not the size of the question. Before transcribing everything, narrow the search with what is cheap: titles, dates, descriptions and file metadata.