Skip to content

Commit

Permalink
feat: speech to text/translation
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed May 26, 2023
1 parent e7c266d commit 749641d
Show file tree
Hide file tree
Showing 54 changed files with 1,333 additions and 2,045 deletions.
4 changes: 3 additions & 1 deletion plugnmeet/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.plugnmeet.org/
Tags: mynaparrot, web conference, plugnmeet
Requires at least: 5.9
Tested up to: 6.2
Stable tag: 1.2.2
Stable tag: 1.2.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -67,6 +67,8 @@ This plugin will require the [plugNmeet-server](https://github.com/mynaparrot/pl
2. Shared notepad

== Changelog ==
= 1.2.3 =
* feat: Speech to text/translation

= 1.2.1 =
* ingress
Expand Down
1 change: 1 addition & 0 deletions plugnmeet/admin/class-plugnmeet-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ public function save_room_data() {
'breakout_room_features',
'display_external_link_features',
'ingress_features',
'speech_to_text_translation_features',
'default_lock_settings',
'custom_design'
];
Expand Down
1 change: 1 addition & 0 deletions plugnmeet/admin/class-plugnmeet-room-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private function getFormData() {
'breakout_room_features',
'display_external_link_features',
'ingress_features',
'speech_to_text_translation_features',
'default_lock_settings',
'custom_design'
];
Expand Down
6 changes: 6 additions & 0 deletions plugnmeet/admin/partials/plugnmeet-admin-edit-room.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@
<?php echo PlugnmeetHelper::getIngressFeatures( $fields_values['ingress_features'] ); ?>
</tbody>
</table>
<hr/>
<table class="form-table" role="presentation">
<tbody>
<?php echo PlugnmeetHelper::getSpeechToTextTranslationFeatures( $fields_values['speech_to_text_translation_features'] ); ?>
</tbody>
</table>
</div>

<div class="tab-pane fade" id="lock" role="tabpanel" aria-labelledby="lock-tab">
Expand Down
46 changes: 44 additions & 2 deletions plugnmeet/helpers/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ public static function getDisplayExternalLinkFeatures( $display_external_link_fe
}

public static function getIngressFeatures( $ingress_features ) {
$displayIngressFeatures = array(
$ingressFeatures = array(
"is_allow" => array(
"label" => __( "Allow create ingress", "plugnmeet" ),
"options" => array(
Expand All @@ -569,7 +569,49 @@ public static function getIngressFeatures( $ingress_features ) {
$data = $ingress_features;
}

return self::formatHtml( $displayIngressFeatures, "ingress_features", $data );
return self::formatHtml( $ingressFeatures, "ingress_features", $data );
}

public static function getSpeechToTextTranslationFeatures( $speech_features ) {
$speechFeatures = array(
"is_allow" => array(
"label" => __( "Allow speech to text/translation feature", "plugnmeet" ),
"options" => array(
array(
"label" => __( "Yes", "plugnmeet" ),
"value" => 1
),
array(
"label" => __( "No", "plugnmeet" ),
"value" => 0
)
),
"selected" => 1,
"type" => "select"
),
"is_allow_translation" => array(
"label" => __( "Allow translation", "plugnmeet" ),
"options" => array(
array(
"label" => __( "Yes", "plugnmeet" ),
"value" => 1
),
array(
"label" => __( "No", "plugnmeet" ),
"value" => 0
)
),
"selected" => 1,
"type" => "select"
)
);

$data = [];
if ( ! empty( $speech_features ) ) {
$data = $speech_features;
}

return self::formatHtml( $speechFeatures, "speech_to_text_translation_features", $data );
}

public static function getDefaultLockSettings( $default_lock_settings ) {
Expand Down
2 changes: 1 addition & 1 deletion plugnmeet/helpers/libs/plugnmeet-sdk-php/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "plugNmeet PHP SDK",
"type": "library",
"license": "MIT",
"version": "1.2.0",
"version": "1.2.5",
"autoload": {
"psr-4": {
"Mynaparrot\\Plugnmeet\\": "src/"
Expand Down
Loading

0 comments on commit 749641d

Please sign in to comment.