Play Voice from wifi

magpa1
Posts: 5
Joined: Fri Nov 02, 2018 7:02 am

Play Voice from wifi

Postby magpa1 » Fri Nov 02, 2018 7:52 am

Hi to every body this is my first access to this forum and I send to all a very big HELLO!

I go directly to what I'm doing now. I should want to speech by ESP32 a voice cames in from wifi with many samples. I saw many examples on esp32 voice but I didn't find what I need.
I saw for example esp32 speeches a file internal its code and it looks loke a wav file with also the header. When I try to put my wav file I heard only big noise. I compared the two wav files and thay have very different codecs also if both are 8Khz 16bit mono.

The code I discover are in the following (only part of files):
80 80 80 80 80 81 81 81 81 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7D 7E 7D 7E 7E 7E 7E 7E 7E 7E 7E 7E 7D 7D 7D 7D 7E 7E 7E 7F 7F 7F 80 80 80 80 81 81 81 82 82 82 83 82 82 83 83 83 84 84 84 84 85 85 85 85 84 84 84 84 83 83 83 82 82 83 82 82 82 82 82 and this is OK for ESP 32
and this:
F4 FF FC FF F8 FF 08 00 F3 FF FE FF F1 FF FB FF E9 FF 03 00 F5 FF 08 00 F6 FF F3 FF FB FF FC FF 04 00 F8 FF 00 00 E8 FF 01 00 E5 FF ED FF FF FF ED FF 00 00 F8 FF FF FF F5 FF F2 FF E7 FF F3 FF F7 FF FC FF F8 FF ED FF FA FF FE FF F2 FF ED FF E4 FF E0 FF 00 00 F7 FF FF FF 0B 00 EB FF 0D 00 F2 FF 01 00 10 00 FE FF 0B 00 FB FF F5 FF 0B 00 this is NOT OK for ESP32

As you can see the codec is different also if both are played from Audacity but no from ESP32.

I understand with this very little piece of file is not enough to say this or that, but believe me the codifica of bytes are different. I would like to give them a name and how can I translate by code from one to another.

Thanks alot

magpa1
Posts: 5
Joined: Fri Nov 02, 2018 7:02 am

Re: Play Voice from wifi

Postby magpa1 » Fri Nov 02, 2018 3:56 pm

I add other info to understand better teh situation. The output of the mic of telefone is in second format then no esp32 compatible instead the files took from https://www.thesoundarchive.com/star-wars.asp as Princess Leia (nerfherder.wav) is compatible (for this the frequency is 22050 the you setup timerAlarmWrite(timer, 50, true) from 125 to 50 usec), instead Darth Sidious (swsidious01.wav) is not compatible.

I hope somebody are interested with this esp32 aspect and can help me. Thanks

magpa1
Posts: 5
Joined: Fri Nov 02, 2018 7:02 am

Re: Play Voice from wifi

Postby magpa1 » Mon Nov 05, 2018 5:52 pm

Instructions for esperiment.
To play file on esp32 get file XT_DAC_Audio_4.0.1 from http://www.xtronical.com/the-dacaudio-l ... stallation

After unzip select the playwav and if you directly run it, you'll hear a normal voice.

If you substitute the data of SoubdData.h with part of Darth Sidious as I said in previous post got from HxD to Edit->Copy as->C and paste in the file SoundData.h you''ll hear only big noise. Instead both files are very intellegible with Audacity. WHY?

I hope so gave you a test to understand better my problem. I'd like to send the microfone signal buffer to esp32 to speech fine instead I obtain only big noise. What I have to do? Where it is my mistake ?

I hope now it is better understandable the problem and I wait for your help. Thanks to all esp32 experts.

magpa1
Posts: 5
Joined: Fri Nov 02, 2018 7:02 am

Re: Play Voice from wifi

Postby magpa1 » Wed Nov 07, 2018 12:08 pm

SOLVED.
The problem was the code. The files was different for number of bit/sec of the other(first 16, second 8), then I did data conversion and all works FINE.

Return to “ESP32 ADF”

Who is online

Users browsing this forum: No registered users and 2 guests