8000 TextToSpeech Widget by MarcSkovMadsen · Pull Request #1878 · holoviz/panel · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@MarcSkovMadsen
Copy link
Collaborator
@MarcSkovMadsen MarcSkovMadsen commented Dec 30, 2020

I think this could be a nice addition to Panel and provide some nice use cases. I hope you (@philippjfr ) will think so as well.

It might not be within "Data Viz" but for exploring and testing out ideas and working with machine learning or just developing small tools it can be really nice. And for me Panel is about data, models and analytics including AI and DL.

It is READY for review. I can't find any more bugs or things to improve for my use cases.

You can checkout how it works in the video on discourse https://discourse.holoviz.org/t/speech-synthesis/1631

image

@philippjfr
Copy link
Member

Would be happy to merge this, but let's call it TextToSpeech or something similar.

@MarcSkovMadsen
Copy link
Collaborator Author

I like the TextToSpeech name. Have been thinking the same. The reason why I did not do it is that 1) the HTML version is called speechSynthesis and 2) there is also SpeechSynthesisUtterance and SpeechSynthesisVoice objects defined and used.

Would you you rename those additional objects to Utterance and Voice as well? I like that for simplicity and specificity. But we loose the reference to the original objects. Like renaming Tabulator to Table. 🙂

@philippjfr

@MarcSkovMadsen MarcSkovMadsen changed the title SpeechSynthesis Widget TextToSpeech Widget Dec 30, 2020
@MarcSkovMadsen
Copy link
Collaborator Author

I've renamed to TextToSpeech, Utterance and Voice respectively.

@MarcSkovMadsen
Copy link
Collaborator Author
MarcSkovMadsen commented Feb 12, 2021

Note: I'm currently refactoring as requested. This includes changing the speak function to a value parameter. This has the consequence that the same text can no longer be spoken twice in a row. I have a feeling that for a lot of testing/ learning this is actually not what you want.

So I will also add a speak action.

@MarcSkovMadsen
Copy link
Collaborator Author

I believe I have implemented review feedback. Next step is on you @philippjfr . Let me know if there is more I should do. Thx.

@philippjfr
Copy link
Member
philippjfr commented Feb 16, 2021

A few more comments:

  • Please follow the exact template of other reference notebooks, i.e. no titles, keep imports at the top, keep the heading levels the same
  • Do not leave pylint annotations in the code, Panel uses flake8
  • Keep spaces between assignments (i.e. a = b not a=b) and equalities (i.e. a == b not a==b)
  • Do not add brackets for single line blocks in JS:
if (a == b)
  doSomething()

not

if (a == b) {
  doSomething()
}
  • Do not use semi-colons unless necessary
  • Do not use this_ = this patterns, instead use arrow functions (() => { }) wherever possible.

@codecov
Copy link
codecov bot commented Feb 16, 2021

Codecov Report

Merging #1878 (05ffd00) into master (8b6aacc) will increase coverage by 0.05%.
The diff coverage is 88.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1878      +/-   ##
==========================================
+ Coverage   84.85%   84.90%   +0.05%     
==========================================
  Files         154      160       +6     
  Lines       19128    19522     +394     
==========================================
+ Hits        16231    16576     +345     
- Misses       2897     2946      +49     
Impacted Files Coverage Δ
panel/widgets/text_to_speech.py 85.18% <85.18%> (ø)
panel/tests/widgets/test_text_to_speech.py 92.50% <92.50%> (ø)
panel/models/text_to_speech.py 100.00% <100.00%> (ø)
panel/tests/layout/test_spacer.py 100.00% <100.00%> (ø)
panel/viewable.py 71.25% <100.00%> (+0.11%) ⬆️
panel/widgets/__init__.py 100.00% <100.00%> (ø)
panel/models/speech_to_text.py 100.00% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b6aacc...05ffd00. Read the comment docs.

@philippjfr philippjfr merged commit bb8dbca into master Feb 16, 2021
@philippjfr philippjfr deleted the speech-synthesis branch February 16, 2021 14:26
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0