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

llm-audio ignores playVolume setting from clients #8

Closed
nyasu3w opened this issue Feb 3, 2025 · 5 comments
Closed

llm-audio ignores playVolume setting from clients #8

nyasu3w opened this issue Feb 3, 2025 · 5 comments

Comments

@nyasu3w
Copy link

nyasu3w commented Feb 3, 2025

Environment: StackFlow v1.4.0 and M5Module-LLM dev branch

The playVolume setting is not available from M5Module-LLM library on arduino.
The below code makes no effect.

    /* Setup Audio module */
    M5.Display.printf(">> Setup audio..\n");
    m5_module_llm::ApiAudioSetupConfig_t audio_config;
    audio_config.playVolume = 0.01;  
    module_llm.audio.setup(audio_config);

When I changed the value of "volume" of "play_param" in /opt/m5stack/share/audio.json, the volume got quietter as expected. So I doubt that the volume setting from json might not be implemented in v1.4.0.

@Abandon-ht
Copy link
Contributor

The playVolume parameter is obsolete in StackFlow 1.3 and later versions. Use json for configuration instead.

@nyasu3w
Copy link
Author

nyasu3w commented Feb 6, 2025

Oh, it is obsolete. How do I change volumes of awake_wav(kws) and tts?

@Abandon-ht
Copy link
Contributor

Modify the value of volume in the play_param item in the /opt/m5stack/share/audio.json file.

@dianjixz
Copy link
Contributor

dianjixz commented Feb 7, 2025

Before calling the audio unit, you can use the following:

{
    "request_id": "1",
    "work_id": "audio",
    "action": "setup",
    "object": "audio.play",
    "data": {
        "volume": 0.5
        }
}

Initialize the audio module to dynamically configure the volume.

@nyasu3w
Copy link
Author

nyasu3w commented Feb 7, 2025

Thanks for good information.
My understanding is that "playVolume" is renamed to "volume", and it is not imeplemented yet in M5Module-LLM library.
(And it seems that more configurations are supported in llm_audio by CONFIG_AUTO_SET macro.)

@nyasu3w nyasu3w closed this as completed Feb 8, 2025
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

No branches or pull requests

3 participants