imr-framework / amri

Autonomous Magnetic Resonance Imaging
GNU Affero General Public License v3.0
6 stars 0 forks source link

synthesize_speech on fixed input text #3

Open CloudApiStudy opened 4 years ago

CloudApiStudy commented 4 years ago

Hi,

I come from a research team, which works on bugs in real-world applications.

I want to make a report about a potential performance improvement in your project.

In file amri/usernode/voice_activation_main.py, synthesize_speech is called to generate audio files in each run. However, its input is a set of fixed string in line 26-37. This behavior increases execution time and brings unnecessary service cost. A caching mechanism could help such situation, e.g. save audio file on disk at first API call, and re-use that file later.

Perhaps someone might be able to confirm if these seem reasonable. Also, if you need any help, I'm happy to provide some code snippet for fixing.

If you are not offended by it, we may include your response as a percentage number (e.g. xx% of applications faces xx problem, and xx% of them confirms it) in our research paper.

Thanks.

imr-framework commented 4 years ago

Hello,

Thank you for your inputs. Agreed, performance could be improved if the fixed-string audio is generated and cached. We will keep that in mind for future implementations.

Also, please feel free to include this response in your research paper. We'd be happy to help out with citations for AMRI.