Skip to content
This repository was archived by the owner on Feb 8, 2019. It is now read-only.
This repository was archived by the owner on Feb 8, 2019. It is now read-only.

Use a ramdisk for the TTS tmp files #47

@E3V3A

Description

@E3V3A

Consider using a ramdisk for the temporary files created in /tmp to store pico2wav files used in the text-to-speech function, in node_helper.js. This would help save SD card based devices from over-wear.

    var commandTmpl = 'pico2wave -l "{{lang}}" -w {{file}} "{{text}}" && aplay {{file}}'

    function getTmpFile() {
        var random = Math.random().toString(36).slice(2),
        path = '/tmp/' + random + '.wav'
        return (!fs.existsSync(path)) ? path : getTmpFile()
    }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions