9

I would like to dictate Latex by speech rather than writing it down. What is your suggested approach?

Your method may include free as well as proprietary software

There are several approaches including

Talon and mathfly Talon and LyX and Dragon Nuance

or apps like that or this approach and I am sure many more approaches like SayTex and TexTate.

I would be interested in solutions that simplify the problem as much as possible and keep you motivated for long term.


To the editors, that closed this question: There is an answer but it is 8 years old. This question is supposed to update the original answerts.

  • 2
    It will depend: What is your use-case? Ordinary text plus formatting commands like bold and chapter and \cite{...}? Or functions like drawing a TikZ picture, or processing fontfiles and blocks of 10,000 Unicode characters? (I use a spreadsheet to build the code.) Probably making one-name macros for commonly used, or complex, command sets would be useful. – Cicada Jan 01 '23 at 07:57
  • We could start with formatting commands before talking about TikZ pictures. I assume, switching between math mode and text, dictating _{} and ^{} can be challenging. That's why I am interest in the best concepts. – Uwe.Schneider Jan 01 '23 at 12:07
  • 3
    The most efficient method? Probably to hire @egreg as your personal secretary and dictate it to him. But I suspect the monthly price will be a bit high. – Gaussler Jan 01 '23 at 16:18
  • Besides usual speech to text approaches, I wonder if you could try using speech to text to create prompts for ChatGPT? It can write fairly decent python, so maybe latex could also work. – Andy Clifton Jan 02 '23 at 09:10
  • 5
    Even though it has been a long time since the previous question was asked, in my opinion it's not a good idea to ask a separate question because ■ any answer that can be posted here can also be posted to the old question, and ■ if there are multiple questions, answers will be fragmented and consequently overall harder to find. As such I vote to close this as duplicate of seeking information regarding the availability of voice recognition software for latex input – user202729 Jan 02 '23 at 09:44
  • 1
    @Uwe.Schneider A good way to encourage new answers to old questions are bounties. This will draw attention and encourage new answers without the drawbacks of fragmentation of information across several posts. If you write a short (one or two sentence) statement why the post needs new answers and post it as comment to the linked question, I'd be happy to start a bounty for you so you don't loose any privileges. – samcarter_is_at_topanswers.xyz Jan 02 '23 at 13:40

1 Answers1

3

Besides usual speech to text approaches, you could try using speech to text to create prompts for ChatGPT.

ChatGPT can write fairly decent latex code with natural-language prompts. For example, the prompt „write latex code for a figure using the file test.png with a caption this is a test“ gives perfectly usable code:

enter image description here

This approach appears to work also for dictating block text.

It’s not hands-off (you still have to copy the code) but it does simplify the problem of writing latex considerably. I suspect it would be challenged by using packages though, where using traditional voice control software to write commands should be much better.

That said, it can do tikz:

Write tikz code for an if-then-else flowchart

\begin{tikzpicture}[node distance=2cm]

% Define block styles \tikzstyle{decision} = [diamond, draw, fill=blue!20, text width=4.5em, text badly centered, inner sep=0pt] \tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=5em, text centered, rounded corners, minimum height=4em] \tikzstyle{line} = [draw, -latex']

% Place nodes \node [block] (init) {Initialize}; \node [decision, below of=init] (decide) {Decide}; \node [block, below of=decide, node distance=3cm] (if) {If branch}; \node [block, right of=if, xshift=3cm] (else) {Else branch}; \node [block, below of=if] (endif) {End if};

% Draw edges \path [line] (init) -- (decide); \path [line] (decide) -- node {Yes} (if); \path [line] (decide) -- node {No} (else); \path [line] (if) -- (endif); \path [line] (else) -- (endif);

\end{tikzpicture}

I’ve not tested it yet for equations as it’s too early in the year for maths…

Edit: it can do maths. It took some fiddling with the prompt, but this worked:

Write the complete latex code for an equation where y equals m times x plus c squared

…gave me this

\begin{equation}
y = mx + c^2
\end{equation}

It was important to use the phrase “complete latex code”, otherwise there was no equation environment.

Conclusion - seems like a potential way to generate latex code from voice prompts, but I doubt it would offer as much flexibility and utility in the long term as learning how to use a dedicated voice control software to control a decent latex editor / compiler. But maybe there is a niche here for helping new users learn how to use latex?

Andy Clifton
  • 3,699