# Can Julia make voice synthesizer using pressure simulation?

**URL:** https://discourse.julialang.org/t/can-julia-make-voice-synthesizer-using-pressure-simulation/106220
**Category:** General Usage
**Tags:** audio
**Created:** [November 14, 2023, 2:44pm UTC](https://discourse.julialang.org/t/can-julia-make-voice-synthesizer-using-pressure-simulation/106220 "2023-11-14T14:44:22Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Tarny\_GG\_Channie](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)
#### Post date: [November 14, 2023, 2:44pm UTC](https://discourse.julialang.org/t/can-julia-make-voice-synthesizer-using-pressure-simulation/106220/1 "2023-11-14T14:44:22Z")

</div>

> **[Speech synthesis](https://en.wikipedia.org/wiki/Speech_synthesis)**
>
> Speech synthesis is the artificial production of human speech. A computer system used for this purpose is called a speech synthesizer, and can be implemented in software or hardware products. A text-to-speech (TTS) system converts normal language text into speech; other systems render symbolic linguistic representations like phonetic transcriptions into speech. The reverse process is speech recognition.
> Synthesized speech can be created by concatenating pieces of recorded speech that are store...

A good synthetic speaker could talk, sing, and perform lots of stuffs.

So, the question today is… would it be possible for Julia to synthesize voice by simulating vibration or even aIr pressure?

(Maybe it’s totally just me wanting to create a synthetic singer with Julia.)

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [November 14, 2023, 2:50pm UTC](https://discourse.julialang.org/t/can-julia-make-voice-synthesizer-using-pressure-simulation/106220/2 "2023-11-14T14:50:28Z")

</div>

It’s not clear to me what you’re asking for. Of course you could implement this in Julia. Do we already have a package that does this? I’m not sure.

---

<div class="post-metadata">

### Author: ![Tarny\_GG\_Channie](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)
#### Post date: [November 15, 2023, 2:04am UTC](https://discourse.julialang.org/t/can-julia-make-voice-synthesizer-using-pressure-simulation/106220/3 "2023-11-15T02:04:51Z")

</div>

Is it possible? How? With what technique?  
Full simulation is very computationally expensive. Human-heard sound is vibration of up to 20000 hz. The resolution might need to be at least 0.01m and time step of 20000hz minimum if not more. It could easily reach 10^12 compute just for one second of speech synthesis, and that’s quite an optimistic estimate.

---

<div class="post-metadata">

### Author: ![mike.ingold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike.ingold/32/203749_2.png) [@mike.ingold](https://discourse.julialang.org/u/mike.ingold)
#### Post date: [November 15, 2023, 3:36am UTC](https://discourse.julialang.org/t/can-julia-make-voice-synthesizer-using-pressure-simulation/106220/4 "2023-11-15T03:36:14Z")

</div>

If all you’re trying to achieve is “just” [speech synthesis](https://en.wikipedia.org/wiki/Speech_synthesis) then you could look for a Julia package that implements it [here](https://www.juliapackages.com/packages?search=Speech). A full-up acoustic physics engine would be way overkill for that in most cases. Frankly, there’s a hell of a lot you could do to mimic more complicated acoustic effects with simple DSP filters and convolutions, if you’re so inclined.

---

<div class="post-metadata">

### Author: ![Tarny\_GG\_Channie](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)
#### Post date: [November 15, 2023, 4:15am UTC](https://discourse.julialang.org/t/can-julia-make-voice-synthesizer-using-pressure-simulation/106220/5 "2023-11-15T04:15:03Z")

</div>

Yes, that’s a good advice. Unfortunately, I’m not talking a regular speech synthesis. I’m talking about making the best song possible synthetically. If there is a task where I could improve my music quality just by throwing PC-level compute power at it, it’s a cheap win for me.

That being said, many of my ideas are in planning phases and I rarely get to execute them, and my execution often get sloppy, if at all.

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [November 15, 2023, 5:13am UTC](https://discourse.julialang.org/t/can-julia-make-voice-synthesizer-using-pressure-simulation/106220/6 "2023-11-15T05:13:39Z")

</div>

Check out this youtube channel where the guy implements an engine simulator in order to synthesize engine sounds

> **[AngeTheGreat](https://www.youtube.com/@angethegreat)**
>
> Watch me reinvent the wheel!

In one video, he uses it to simulate musical instruments as well.

> [@Tarny\_GG\_Channie](#):
>
> It could easily reach 10^12 compute just for one second of speech synthesis

With my CPU alone

```julia
julia> LinearAlgebra.peakflops()
5.428951136982075e11

```

and likely 10x higher with GPU. So I’m not sure if you back-of-the-envelop calculation needs to scare you off.
