liveBook · Manning

Voice input

As explained in Data Analysis with LLMs

Spoken input is information conveyed to a computer through human speech rather than typed text.

Voice input is information conveyed to a computer through human speech instead of typed text. A microphone and recording software capture the speech as audio that Python can process. section 7.0 section 7.1

Voice input makes practical data work more flexible. Instead of returning to a desk to type a database question, you can speak it while examining data, transcribe it, convert it to SQL, and present the results. section 7.3

A voice-enabled workflow can use speech in several ways:

  • Record speech and transcribe the audio into text. section 7.0 section 7.1
  • Use transcribed speech as the input to a natural-language database query interface. section 7.3
  • Translate spoken input into another language and generate spoken output. section 7.4.1

A spoken database question

While pacing through the office, speak a question about tabular data. The system transcribes the recording, translates the request into a formal SQL query, executes it, and presents the result without requiring the question to be typed. section 7.3

Figure 7.2 Our translator tool records spoken input in a first language, transcribes input to text, trans- lates that text into a second language, and finally generates spoken output.
figure

Follow the pipeline from recorded speech in one language through transcription and translation to generated speech in another. section 7.4.1

To try voice input in Python, use a microphone, sounddevice, and scipy to record audio. Add requests for API calls, and use playsound when generated speech must play on the computer; macOS may also require PyObjC. section 7.1

How Data Analysis with LLMs covers it

How deep it goes
Explains recording setup and application pipelines, but stops short of model internals and detailed implementation code.
Examples
Uses spoken tabular-data questions and a speech-to-speech translator as concrete applications.
What it assumes
Assumes basic Python setup while teaching microphone recording and audio-library configuration directly.
What you can do after
Build it from scratch as a Python-based recording, transcription, voice-query, or speech-translation workflow.
How it connects
Connects voice input with audio recording, speech transcription, natural-language interfaces, SQL, language translation, and speech generation.

This explainer was generated by Manning's knowledge graph from the text of Data Analysis with LLMs. The section links point to the parts of the book it draws on.