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

I hope it can support more program languages #2

Open
giteRdroid opened this issue Jun 18, 2020 · 17 comments
Open

I hope it can support more program languages #2

giteRdroid opened this issue Jun 18, 2020 · 17 comments
Labels
enhancement New feature or request

Comments

@giteRdroid
Copy link

I hope it can support more program languages, such as golang, C++. I always write program with golang. I need it makes me BOKI!!

@giteRdroid
Copy link
Author

giteRdroid commented Jun 18, 2020

python is also be ok

@SaekiRaku
Copy link
Owner

SaekiRaku commented Jun 18, 2020

Thanks for your feedback.

Diversity is the primary goal of this project, I hope it can suitable for more programmer no matter what program languages they are using. However, it needs a lot of works to do and take a lot of time. The built-in voices of the extension were came from a friend of mine, two of us certainly can not handle all of these requests in the future.

So, I'm hoping the community can contribute more voice packages. And speaking of diversity, it's not only mean different program languages, but also mean different gender, country, etc. Therefore, almost everyone can contribute, I'll be happy to accept such a PR.

In general, I think the next move of this project may be like this:

  • Add CONTRIBUTE.md so that people who willing to help can contribute correctly.
  • Make the Customize Voice Package document more perfect.
  • Build a tool that let people add voice easily so that some non-programmer can also create voice packages.

感谢您的反馈意见。

多元化是该项目的主要目标,我希望无论使用哪种程序语言,它都能适合更多程序员。但是,这需要做很多工作,并且要花费很多时间。目前扩展程序的内置声音来自我的一个朋友,只有我们两个人肯定无法处理所有的这些请求。

因此,我希望社区能够贡献更多的语音包。并且,谈到多元化,这不仅意味着不同的程序语言,还意味着不同的性别,国家等。因此,几乎每个人都可以做出贡献,我很高兴接受这样的PR。

总的来说,我认为这个项目的下一步可能是这样的:

  • 添加CONTRIBUTE.md,以便愿意帮助的人们可以正确地做出贡献。
  • 使自定义语音包文档更加完善。
  • 构建一个可以使人们轻松添加语音的工具,以便某些非程序员也可以创建语音包。

@giteRdroid
Copy link
Author

giteRdroid commented Jun 18, 2020

Thx

Thanks for your feedback.

Diversity is the primary goal of this project, I hope it can suitable for more programmer no matter what program languages they are using. However, it needs a lot of works to do and take a lot of time. The built-in voices of the extension were came from a friend of mine, two of us certainly can not handle all of these requests in the future.

So, I'm hoping the community can contribute more voice packages. And speaking of diversity, it's not only mean different program languages, but also mean different gender, country, etc. Therefore, almost everyone can contribute, I'll be happy to accept such a PR.

In general, I think the next move of this project may be like this:

  • Add CONTRIBUTE.md so that people who willing to help can contribute correctly.
  • Make the Customize Voice Package document more perfect.
  • Build a tool that let people add voice easily so that some non-programmer can also create voice packages.

Thx for your reply, I hope your project more and more NB(in Chinese) in the future.
Than I hope it can provide some guides and documents, that make other programmers can adapt another program languages.

@fengyuentau
Copy link

@SaekiRaku Could you provide some guides on how to support other language if you are too busy to deal with all the requests. Though I am not a JS expert, I am willing to hack into this repo.

@SaekiRaku
Copy link
Owner

@fengyuentau Thanks for your attention, here is a simple guide on customizing voice packages: https://saekiraku.github.io/vscode-rainbow-fart/#/zh/voice-packages.md If you have any question or improvement about this document, I'm glad to have your feedback.

P.S. The English version of this document was not translated, I'll be happy to accept PR.

Thanks again.

@fengyuentau
Copy link

fengyuentau commented Jun 21, 2020

@SaekiRaku Sorry I did not make myself understood. To clarify, I want it to support more program language since I am not a JS programmer. But the page you provide also works, I will try modify it to fit my case. Thanks.

@chenzhekl
Copy link

IIRC, in the current implementation, voice is trigged based on the keyword that is being typed. It would be great if the keyword list can be provided separately per the programming language. I guess that's what the issue is asking for.

@SaekiRaku
Copy link
Owner

@chenzhekl

Sorry, I'm still confused.

In the current implementation, if you want to make the voice support other programming languages, you can simply add more keywords to it. Like this:

// manifest.json - contributes
{
    // JavaScript, Golang
    "keywords": ["function", "func"],
    "voices": [ "function_01.mp3"  ]
}

Are you suggesting to make the json file be like this?

// manifest.javascript.json
{
    // JavaScript
    "keywords": ["function"],
    "voices": [ "function_01.mp3"  ]
}

// manifest.golang.json
{
    "keywords": ["func"],
    "voices": [ "function_01.mp3"  ]
}

@fengyuentau
Copy link

@SaekiRaku I guess that's the key point of this issue. I tried to edit ~/.vscode/extension/vscode-rainbow-fart/src/built-in-voice-packages/built-in-voice-chinese/contributes.json to add more keywords, but it does not work. The webpage still shows the old keywords. Do you have any ideas?

@chenzhekl
Copy link

chenzhekl commented Jun 21, 2020

@SaekiRaku Thanks for your reply! Yeah, that's what we're hoping for. For one, using a separate keyword list could greatly ease the maintenance. Moreover, that might help resolve ambiguities between different programming languages. For example, the fat arrow (=>) is used to define a lambda in C# and ES6 while in Rust it's used for the pattern matching. Of course, using multiple keyword lists could bring in some duplications. A compromise might be providing a global keyword list plus a language-specific one. What do you think?

@SaekiRaku
Copy link
Owner

@fengyuentau

The contributes.json will be cached after extension activated, you need to click the refresh button on the web to reload it. But if the built-in voice package has changed in future updates, it will re-copy all files to the built-in voice packages directory, then you will lose your changes.

I recommend you to copy the built-in voice package and change the directory name and the name in manifest.json, then add the keywords. At last, click refresh.

@fengyuentau
Copy link

@SaekiRaku I followed you suggestion, but it seems that the refresh does not work. Neither it refreshed the keywords that I changed to the built-in package, nor did it refresh the new directory that I copied and modified. I installed this extension on my remote server, is it the problem? I can type existed keywords and hear the voice played.

@SaekiRaku
Copy link
Owner

@fengyuentau

I've tried to use the extension with VSCode Remote on a CentOS server, it works for me. Here is my step:

  1. Install the extension on remote server and enable it.
  2. Copy and modify the contributes.json on the remote server, the path should be like this: /$USER/.vscode-server/data/User/globalStorage/saekiraku.rainbow-fart/voice-packages/built-in-voice-chinese/contributes.json
  3. click refresh

DO NOT EDIT /$USER/.vscode-server/extensions/saekiraku.rainbow-fart-1.2.0/src/built-in-voice-packages, it won't work.

If you are using windows server, I'm not sure about the path. You can clone this project, and run VSCode command: > Debug: Start Debugging. It will bring up a new VSCode window, use that to connect to the remote server and enable the extension. You will see the path in the DEBUG CONSOLE panel.

@SaekiRaku
Copy link
Owner

@chenzhekl

I've conceived some methods to achieve the request, too. for example:

{
    "keywords": ["=>"],
    "include": [ "rust" ],
    "voices": [ "pattern_matching.mp3" ]
},
{
    "keywords": ["=>"],
    "exclude": [ "rust" ],
    "voices": [ "lambda.mp3" ]
}

But I think there still has a problem. See, I didn't know the meaning of fat arrow in Rust, and maybe there has another language that also has a different meaning for the fat arrow and we don't know. It will be an annoying job to keep maintain the language-specific keywords list or include/exclude list, and it will keep users waiting for the changing. So I think maybe the best way is to provide a function in the web UI to let users disable specific keywords/voices.

@chenzhekl
Copy link

@SaekiRaku True, that's indeed a problem. I don't have much knowledge about how the voice package is structured, though. I'm wondering if it's possible to bundle the configuration file with the voice resources and make such a voice package the smallest distribution unit (as a separate extension). Then maintaining the keyword list becomes the job of the voice package maintainer. Besides, the user is able to define custom keywords on top of the pre-defined keywords to extend existing voice packages.

P.S. inter-extension communication

@SaekiRaku
Copy link
Owner

@PM-Ops

IMG_5930

@stardiviner
Copy link

stardiviner commented Dec 3, 2020

@SaekiRaku 嗨,用了自己开发的emacs-rainbow-fart一段时间了,有用户报告说缺少class语音 https://github.com/stardiviner/emacs-rainbow-fart/issues/10 ,不知道作者朋友能不能添加下。让默认语音包更加完善点。非常感谢 😄

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

No branches or pull requests

6 participants
@stardiviner @chenzhekl @SaekiRaku @fengyuentau @giteRdroid and others