ropensci / software-review

rOpenSci Software Peer Review.
292 stars 104 forks source link

conrad: Client for the Microsoft Cognitive Services Text to Speech REST API #594

Closed howardbaik closed 1 year ago

howardbaik commented 1 year ago

Submitting Author Name: Howard Baek Submitting Author Github Handle: !--author1-->@howardbaek<!--end-author1-- Other Package Authors Github handles: (comma separated, delete if none) !--author-others-->@muschellij2<!--end-author-others-- Repository: https://github.com/fhdsl/conrad Version submitted: 1.0.0 Submission type: Standard Editor: TBD Reviewers: TBD

Archive: TBD Version accepted: TBD Language: en


Package: conrad
Title: Client for the Microsoft Cognitive Services Text to Speech REST API
Version: 1.0.0
Authors@R: c( 
    person("Howard", "Baek", email = "howardbaek.fh@gmail.com", role = c("aut", "cre", "cph"),
           comment = c(ORCID = "0009-0000-8942-1618")),
    person("John", "Muschelli", email = "muschellij2@gmail.com", role = c("aut"),
           comment = c(ORCID = "0009-0000-8942-1618"))
           )
Description: Convert text into synthesized speech and get a list of supported voices for a region. 
    The Text to Speech REST API supports neural text to speech voices, which support specific languages and dialects 
    that are identified by locale. 
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Depends: 
    R (>= 2.10)
LazyData: true
Imports: 
    httr2,
    jsonlite,
    magrittr
Suggests: 
    testthat (>= 3.0.0)
Config/testthat/edition: 3

Scope

conrad uses Microsoft's Text to speech REST API to generate audio files as output, data frame of available voices to use in speech synthesis (text-to-speech), and HTTP responses from requests to the API. Also, googleLanguageR label itself as data extraction: https://github.com/ropensci/software-review/issues/127 and this package is very similar in terms of calling text-to-speech APIs.

The target audience is anyone who wants to convert text into speech using Microsoft's Text-to-Speech API.

The scientific application would be any researchers or educators looking to generate automated videos (online courses) using text-to-speech with conrad. conrad is one of the backend R packages to text2speech, a R package which consolidates various text-to-speech engines, including Amazon Polly, Coqui TTS, Google Cloud Text-to-Speech API, and Microsoft Cognitive Services Text to Speech REST API. We will submit text2speech for software review later.

There are other R packages that are clients to Amazon Polly, Coqui TTS, and Google Cloud Text-to-Speech API. The difference is that conrad is a client to the Microsoft Cognitive Services Text to Speech REST API. This package is a reboot of mscstts. Differences are explained in Major differences to mscstts

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

MEE Options - [ ] The package is novel and will be of interest to the broad readership of the journal. - [ ] The manuscript describing the package is no longer than 3000 words. - [ ] You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see [MEE's Policy on Publishing Code](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/journal-resources/policy-on-publishing-code.html)) - (*Scope: Do consider MEE's [Aims and Scope](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/aims-and-scope/read-full-aims-and-scope.html) for your manuscript. We make no guarantee that your manuscript will be within MEE scope.*) - (*Although not required, we strongly recommend having a full manuscript prepared when you submit here.*) - (*Please do not submit your package separately to Methods in Ecology and Evolution*)

Code of conduct

ropensci-review-bot commented 1 year ago

Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help for help.

ropensci-review-bot commented 1 year ago

:rocket:

Editor check started

:wave:

howardbaik commented 1 year ago

I ran pkgcheck() and found alot of errors in this package.

ropensci-review-bot commented 1 year ago

Checks for conrad (v1.0.0)

git hash: a7c9b9fd

Important: All failing checks above must be addressed prior to proceeding

(Checks marked with :eyes: may be optionally addressed.)

Package License: MIT + file LICENSE


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate. |type |package | ncalls| |:----------|:--------|------:| |internal |base | 24| |internal |conrad | 17| |internal |stats | 2| |internal |utils | 1| |imports |magrittr | 8| |imports |httr2 | 6| |imports |jsonlite | 1| |suggests |testthat | NA| |linking_to |NA | NA| Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats()', and examining the 'external_calls' table.

base

paste0 (7), list (6), c (2), as.character (1), attr (1), difftime (1), drop (1), for (1), paste (1), rawToChar (1), Sys.time (1), try (1)

conrad

ms_list_voice (3), ms_create_ssml (2), get_env_key (1), ms_choose_voice (1), ms_exist_key (1), ms_fetch_key (1), ms_get_token (1), ms_region (1), ms_set_key (1), ms_set_region (1), ms_token_url (1), ms_tts_url (1), ms_use_voice (1), region (1)

magrittr

%>% (8)

httr2

request (3), req_headers (1), resp_body_raw (1), resp_body_string (1)

stats

df (2)

jsonlite

fromJSON (1)

utils

browseURL (1)


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has: - code in R (100% in 9 files) and - 2 authors - no vignette - 1 internal data file - 3 imported packages - 13 exported functions (median 14 lines of code) - 21 non-exported functions in R (median 13 lines of code) --- Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used: - `loc` = "Lines of Code" - `fn` = "function" - `exp`/`not_exp` = exported / not exported All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by [the `checks_to_markdown()` function](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) The final measure (`fn_call_network_size`) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile. |measure | value| percentile|noteworthy | |:-----------------------|-----:|----------:|:----------| |files_R | 9| 55.2| | |files_vignettes | 0| 0.0|TRUE | |files_tests | 5| 81.7| | |loc_R | 254| 28.2| | |loc_tests | 37| 20.4| | |num_vignettes | 0| 0.0|TRUE | |data_size_total | 271| 57.4| | |data_size_median | 271| 57.3| | |n_fns_r | 34| 44.1| | |n_fns_r_exported | 13| 53.9| | |n_fns_r_not_exported | 21| 42.1| | |n_fns_per_file_r | 2| 43.2| | |num_params_per_fn | 2| 11.9| | |loc_per_fn_r | 14| 42.4| | |loc_per_fn_r_exp | 14| 33.2| | |loc_per_fn_r_not_exp | 13| 42.7| | |rel_whitespace_R | 17| 30.5| | |rel_whitespace_tests | 30| 23.6| | |doclines_per_fn_exp | 28| 29.1| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 16| 41.7| | ---

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

#### 3a. Continuous Integration Badges [![R-CMD-check.yaml](https://github.com/fhdsl/conrad/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/fhdsl/conrad/actions) **GitHub Workflow Results** | id|name |conclusion |sha | run_number|date | |----------:|:----------------------------------|:----------|:------|----------:|:----------| | 5393525052|.github/workflows/R-CMD-check.yaml |failure |becb00 | 10|2023-06-27 | | 5406631527|R-CMD-check |success |16dc84 | 21|2023-06-28 | --- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) R CMD check generated the following warning: 1. checking package subdirectories ... WARNING Invalid citation information in ‘inst/CITATION’: Error in bibentry(bibtype = entry, textVersion = textVersion, header = header, footer = footer, ...): argument is missing, with no default #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 8.57 The following files are not completely covered by tests: file | coverage --- | --- R/ms_authorization.R | 17.46% R/ms_create_ssml.R | 0% R/ms_list_voice.R | 0% R/ms_region.R | 0% R/ms_synthesize.R | 0% R/ms_voice.R | 0% R/utils.R | 28.57% #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) No functions have cyclocomplexity >= 15 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 55 potential issues: message | number of times --- | --- Avoid library() and require() calls in packages | 3 Lines should not be more than 80 characters. | 28 Use <-, not =, for assignment. | 24


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following 3 function names are duplicated in other packages: - - `ms_create_ssml` from mscstts - - `ms_region` from mscstts - - `ms_synthesize` from mscstts


Package Versions

|package |version | |:--------|:--------| |pkgstats |0.1.3.4 | |pkgcheck |0.1.1.26 |


Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

maelle commented 1 year ago

@howardbaek why did you close this issue? :slightly_smiling_face: thanks for your interest in software review!

howardbaik commented 1 year ago

@maelle Thanks for your comment.

I ran pkgcheck() and realized that I was missing a lot of things, so I closed the issue. Also, I submitted this package to CRAN, so I wanted to see that through before I submit to rOpenSci. The more feedback I get, the better this gets!