Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ping request to keep connection open #27

Merged
merged 3 commits into from
Jun 12, 2018

Conversation

chegewara
Copy link
Contributor

@chegewara chegewara commented Jun 2, 2018

Changes maybe are not optimized, because im learning your code. It works for about 50 minutes, then esp32 crashes.

With this code also changes from https://github.com/kodera2t/Simple_Alexa_dif are added.

@chegewara
Copy link
Contributor Author

I know why its crashing after 50-ish minutes. Amazon server is sending GOAWAY frame. Waiting for answer now:
https://forums.developer.amazon.com/questions/10684/is-there-any-limit-of-avs-api.html?childToView=172203#answer-172203

@MrBuddyCasino
Copy link
Owner

Thanks for this PR. Whats the reason for that one? I'd understand 1.0, whats with 0.52?
renderer_config->sample_rate_modifier = 0.52;

@chegewara
Copy link
Contributor Author

On my board it works with that value with right alexa speed and pitch. Im think it should be 0.544 in fact (i dont have logs right now to show how i counted that). From this comment im guessing its hardware dependent:
#13 (comment)

@MrBuddyCasino MrBuddyCasino merged commit b71ee9f into MrBuddyCasino:master Jun 12, 2018
@MrBuddyCasino
Copy link
Owner

If ping was async to save on stack RAM that would be better, but this is a good start. Merged.

@chegewara
Copy link
Contributor Author

Yes, im aware of that, but im not good enough programmer to implement this. Also there is another option, but i dont know how to implement it. nhttp2 can send PING frame. I think it would be even better solution if someone can implement it.

@chegewara
Copy link
Contributor Author

@MrBuddyCasino I did changes because i saw those two lines:

I (3413442) renderer: changing sample rate from 24000 to 44100
I (3413445) I2S: PLL_D2: Req RATE: 23990, real rate: 24038.000, BITS: 16, CLKM: 26, BCK: 8, MCLK: 6142771.446, SCLK: 769216.000000, diva: 64, divb: 3

Also i had to change this value to 22050 and now online mp3 files are played by webradio with right pitch/speed:
https://github.com/MrBuddyCasino/ESP32_Alexa/blob/master/main/app_main.c#L97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants