Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into #2374_TransmissionT…
Browse files Browse the repository at this point in the history
…orrent
  • Loading branch information
wladimirleite committed Dec 30, 2024
2 parents 66cf208 + 9919563 commit fe3ae5e
Show file tree
Hide file tree
Showing 12 changed files with 174 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ WhatsAppReport.UserJoinedGroupCommunity=joined group from community
WhatsAppReport.UserJoinedGroupInvitation=joined group from invitation
WhatsAppReport.UserJoinedGroupLink=joined group from shared link
WhatsAppReport.ResetGroupLink=reset this group's invite link
WhatsAppReport.CommunityDescriptionChanged=Community description changed
WhatsAppReport.GroupDescriptionChanged=Group description changed
WhatsAppReport.GroupDescriptionDeleted=deleted group description
WhatsAppReport.GroupNameChanged=changed the group name to
Expand Down Expand Up @@ -299,6 +300,8 @@ WhatsAppReport.EphemeralOff=turned off disappearing messages.
WhatsAppReport.EphemeralSave=Now it is possible to save disappearing message in the chat.
WhatsAppReport.Days=days
WhatsAppReport.Hours=hours
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Only community admins can add groups.
WhatsAppReport.CommunityChangedAllMembersCanAdd=Now all community members can add groups.
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add other users to this group.
WhatsAppReport.GroupChangedAllMembersCanEdit=changed this group's settings to allow all participants to edit this group's info.
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=changed this group's settings to allow only admins to edit this group's info.
Expand All @@ -315,6 +318,8 @@ WhatsAppReport.BusinessChangedName=This business account changed its name.
WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.
WhatsAppReport.GroupAddedToCommunity=Group was added to the community
WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community
WhatsAppReport.GroupNotPartOfCommunity=This group is not part of the community anymore.
WhatsAppReport.CommunityNotAvailable=This community is not available anymore
WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Anyone in the community can join this group.
WhatsAppReport.CommunityManagementAction=Community management action.
WhatsAppReport.CommunityRenamed=changed the community's name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ WhatsAppReport.UserJoinedGroupCommunity=joined group from community[TBT]
WhatsAppReport.UserJoinedGroupInvitation=joined group from invitation[TBT]
WhatsAppReport.UserJoinedGroupLink=hat sich über geteilten Link der Gruppe angeschlossen
WhatsAppReport.ResetGroupLink=reset this group's invite link[TBT]
WhatsAppReport.CommunityDescriptionChanged=Community description changed[TBT]
WhatsAppReport.GroupDescriptionChanged=Gruppenbeschreibung geändert
WhatsAppReport.GroupDescriptionDeleted=deleted group description[TBT]
WhatsAppReport.GroupNameChanged=changed the group name to [TBT]
Expand Down Expand Up @@ -299,6 +300,8 @@ WhatsAppReport.EphemeralSave=Now it is possible to save disappearing message in
WhatsAppReport.EphemeralOff=turned off disappearing messages.[TBT]
WhatsAppReport.Hours=hours[TBT]
WhatsAppReport.Days=days[TBT]
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Only community admins can add groups.[TBT]
WhatsAppReport.CommunityChangedAllMembersCanAdd=Now all community members can add groups.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add other users to this group.[TBT]
WhatsAppReport.GroupChangedAllMembersCanEdit=changed this group's settings to allow all participants to edit this group's info.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=changed this group's settings to allow only admins to edit this group's info.[TBT]
Expand All @@ -315,6 +318,8 @@ WhatsAppReport.BusinessChangedName=This business account changed its name.[TBT]
WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT]
WhatsAppReport.GroupAddedToCommunity=Group was added to the community[TBT]
WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community[TBT]
WhatsAppReport.GroupNotPartOfCommunity=This group is not part of the community anymore.[TBT]
WhatsAppReport.CommunityNotAvailable=This community is not available anymore[TBT]
WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Any community member can join this group.[TBT]
WhatsAppReport.CommunityManagementAction=Community management action.[TBT]
WhatsAppReport.CommunityRenamed=changed the community's name[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ WhatsAppReport.UserJoinedGroupCommunity=joined group from community[TBT]
WhatsAppReport.UserJoinedGroupInvitation=joined group from invitation[TBT]
WhatsAppReport.UserJoinedGroupLink=se unió al grupo desde un enlace compartido
WhatsAppReport.ResetGroupLink=reset this group's invite link[TBT]
WhatsAppReport.CommunityDescriptionChanged=Community description changed[TBT]
WhatsAppReport.GroupDescriptionChanged=Se ha modificado la descripción del grupo
WhatsAppReport.GroupDescriptionDeleted=deleted group description[TBT]
WhatsAppReport.GroupNameChanged=changed the group name to [TBT]
Expand Down Expand Up @@ -299,6 +300,8 @@ WhatsAppReport.EphemeralSave=Now it is possible to save disappearing message in
WhatsAppReport.EphemeralOff=turned off disappearing messages.[TBT]
WhatsAppReport.Hours=hours[TBT]
WhatsAppReport.Days=days[TBT]
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Only community admins can add groups.[TBT]
WhatsAppReport.CommunityChangedAllMembersCanAdd=Now all community members can add groups.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add other users to this group.[TBT]
WhatsAppReport.GroupChangedAllMembersCanEdit=changed this group's settings to allow all participants to edit this group's info.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=changed this group's settings to allow only admins to edit this group's info.[TBT]
Expand All @@ -315,6 +318,8 @@ WhatsAppReport.BusinessChangedName=This business account changed its name.[TBT]
WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT]
WhatsAppReport.GroupAddedToCommunity=Group was added to the community[TBT]
WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community[TBT]
WhatsAppReport.GroupNotPartOfCommunity=This group is not part of the community anymore.[TBT]
WhatsAppReport.CommunityNotAvailable=This community is not available anymore[TBT]
WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Cualquier miembro de la comunidad puede unirse a este grupo.
WhatsAppReport.CommunityManagementAction=Community management action.[TBT]
WhatsAppReport.CommunityRenamed=cambió el nombre de la comunidad
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ WhatsAppReport.UserJoinedGroupCommunity=a rejoint le groupe par la communauté
WhatsAppReport.UserJoinedGroupInvitation=a rejoint le groupe sur invitation
WhatsAppReport.UserJoinedGroupLink=a rejoint le groupe à partir d'un lien partagé
WhatsAppReport.ResetGroupLink=a réinitialisé le lien d'invitation
WhatsAppReport.CommunityDescriptionChanged=Community description changed[TBT]
WhatsAppReport.GroupDescriptionChanged=Description du groupe modifiée
WhatsAppReport.GroupDescriptionDeleted=Description du groupe supprimée
WhatsAppReport.GroupNameChanged=a changé le nom du groupe
Expand Down Expand Up @@ -299,6 +300,8 @@ WhatsAppReport.EphemeralOff=a désactivé l'effacement des messages.
WhatsAppReport.EphemeralSave=Il est désormais possible de sauvegarder les messages temporaires du chat.
WhatsAppReport.Days=jours
WhatsAppReport.Hours=heures
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Only community admins can add groups.[TBT]
WhatsAppReport.CommunityChangedAllMembersCanAdd=Now all community members can add groups.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=a modifié les paramètres de ce groupe pour permettre uniquement aux administrateurs d'ajouter d'autres utilisateurs.
WhatsAppReport.GroupChangedAllMembersCanEdit=a modifié les paramètres de ce groupe pour permettre à tous les participants d'en modifier les informations.
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=a modifié les paramètres de ce groupe pour permettre uniquement aux administrateurs d'effectuer des modifications.
Expand All @@ -315,6 +318,8 @@ WhatsAppReport.BusinessChangedName=Ce compte professionnel a changé de nom.
WhatsAppReport.ChatBusinessOfficial=Ce chat est avec un compte professionnel officiel.
WhatsAppReport.GroupAddedToCommunity=Le groupe a été ajouté à la communauté.
WhatsAppReport.GroupRemovedFromCommunity=Le groupe a été supprimé de la communauté.
WhatsAppReport.GroupNotPartOfCommunity=This group is not part of the community anymore.[TBT]
WhatsAppReport.CommunityNotAvailable=This community is not available anymore[TBT]
WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=N'importe qui dans la communauté peut rejoindre ce groupe.
WhatsAppReport.CommunityManagementAction=Gestion de la communauté.
WhatsAppReport.CommunityRenamed=Changer le nom de la communauté
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ WhatsAppReport.UserJoinedGroupCommunity=joined group from community[TBT]
WhatsAppReport.UserJoinedGroupInvitation=joined group from invitation[TBT]
WhatsAppReport.UserJoinedGroupLink=si è unito al gruppo tramite link condiviso
WhatsAppReport.ResetGroupLink=reset this group's invite link[TBT]
WhatsAppReport.CommunityDescriptionChanged=Community description changed[TBT]
WhatsAppReport.GroupDescriptionChanged=Descrizione gruppo modificata
WhatsAppReport.GroupDescriptionDeleted=deleted group description[TBT]
WhatsAppReport.GroupNameChanged=changed the group name to [TBT]
Expand Down Expand Up @@ -299,6 +300,8 @@ WhatsAppReport.EphemeralSave=Now it is possible to save disappearing message in
WhatsAppReport.EphemeralOff=turned off disappearing messages.[TBT]
WhatsAppReport.Hours=hours[TBT]
WhatsAppReport.Days=days[TBT]
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Only community admins can add groups.[TBT]
WhatsAppReport.CommunityChangedAllMembersCanAdd=Now all community members can add groups.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add other users to this group.[TBT]
WhatsAppReport.GroupChangedAllMembersCanEdit=changed this group's settings to allow all participants to edit this group's info.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=changed this group's settings to allow only admins to edit this group's info.[TBT]
Expand All @@ -315,6 +318,8 @@ WhatsAppReport.BusinessChangedName=This business account changed its name.[TBT]
WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT]
WhatsAppReport.GroupAddedToCommunity=Group was added to the community[TBT]
WhatsAppReport.GroupRemovedFromCommunity=Group was removed from the community[TBT]
WhatsAppReport.GroupNotPartOfCommunity=This group is not part of the community anymore.[TBT]
WhatsAppReport.CommunityNotAvailable=This community is not available anymore[TBT]
WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Any community member can join this group.[TBT]
WhatsAppReport.CommunityManagementAction=Community management action.[TBT]
WhatsAppReport.CommunityRenamed=changed the community's name[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ WhatsAppReport.UserJoinedGroupCommunity=entrou no grupo através da comunidade
WhatsAppReport.UserJoinedGroupInvitation=entrou no grupo usando convite
WhatsAppReport.UserJoinedGroupLink=entrou no grupo através de link de convite deste grupo
WhatsAppReport.ResetGroupLink=redefiniu o link de convite deste grupo
WhatsAppReport.CommunityDescriptionChanged=Descrição da comunidade alterada
WhatsAppReport.GroupDescriptionChanged=Descrição do grupo alterada
WhatsAppReport.GroupDescriptionDeleted=apagou a descrição do grupo
WhatsAppReport.GroupNameChanged=mudou o nome do grupo para
Expand Down Expand Up @@ -299,6 +300,8 @@ WhatsAppReport.EphemeralSave=Agora é possível salvar as mensagens temporárias
WhatsAppReport.EphemeralOff=desativou mensagens temporárias.
WhatsAppReport.Hours=horas
WhatsAppReport.Days=dias
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Somente admins da comunidade podem adicionar grupos.
WhatsAppReport.CommunityChangedAllMembersCanAdd=Agora todos na comunidade podem adicionar grupos.
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=mudou as configurações deste grupo para permitir que somente admins adicionem outras pessoas ao grupo.
WhatsAppReport.GroupChangedAllMembersCanEdit=mudou as configurações deste grupo para permitir que todos os membros alterem os dados do grupo.
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=mudou as configurações deste grupo para permitir que somente admins alterem os dados do grupo.
Expand All @@ -315,6 +318,8 @@ WhatsAppReport.BusinessChangedName=Esta conta comercial mudou seu nome.
WhatsAppReport.ChatBusinessOfficial=Você está conversando com uma conta comercial oficial.
WhatsAppReport.GroupAddedToCommunity=Grupo foi adicionado a comunidade
WhatsAppReport.GroupRemovedFromCommunity=Grupo foi removido da comunidade
WhatsAppReport.GroupNotPartOfCommunity=Este grupo não faz mais parte da comunidade.
WhatsAppReport.CommunityNotAvailable=Esta comunidade não está mais disponível
WhatsAppReport.AnyCommunityMemberCanJoinThisGroup=Todos os membros da comunidade podem entrar neste grupo.
WhatsAppReport.CommunityManagementAction=Ação de gerenciamento de comunidade.
WhatsAppReport.CommunityRenamed=mudou o nome da comunidade
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class RemoteTranscriptionTask extends AbstractTranscriptTask {

private static AtomicBoolean statsPrinted = new AtomicBoolean();

private static volatile AtomicBoolean init = new AtomicBoolean();

private static long lastUpdateServersTime = 0;

private static class Server {
Expand All @@ -81,7 +83,7 @@ public void init(ConfigurationManager configurationManager) throws Exception {

super.init(configurationManager);

if (!this.isEnabled()) {
if (!isEnabled()) {
return;
}

Expand Down Expand Up @@ -115,8 +117,21 @@ public void init(ConfigurationManager configurationManager) throws Exception {
return;
}

requestServers(true);

synchronized (init) {
if (!init.get()) {
try {
requestServers(true);
} catch (Exception e) {
if (hasIpedDatasource()) {
transcriptConfig.setEnabled(false);
logger.warn("Could not initialize remote transcription. Task disabled.");
} else {
throw e;
}
}
init.set(true);
}
}
}

private static synchronized void requestServers(RemoteTranscriptionTask task, boolean now) throws IOException {
Expand Down Expand Up @@ -163,7 +178,7 @@ private void requestServers(boolean now) throws IOException {
@Override
public void finish() throws Exception {
super.finish();
if (!statsPrinted.getAndSet(true)) {
if (isEnabled() && !statsPrinted.getAndSet(true)) {
int numWorkers = this.worker.manager.getNumWorkers();
DecimalFormat df = new DecimalFormat();
logger.info("Time spent to send audios: {}s", df.format(audioSendingTime.get() / (1000 * numWorkers)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.io.InputStreamReader;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

import org.apache.commons.lang3.SystemUtils;
import org.apache.logging.log4j.Level;
Expand Down Expand Up @@ -42,6 +43,8 @@ public class Wav2Vec2TranscriptTask extends AbstractTranscriptTask {

protected static volatile Level logLevel = Level.forName("MSG", 250);

private static volatile AtomicBoolean init = new AtomicBoolean();

static class Server {
Process process;
BufferedReader reader;
Expand All @@ -68,7 +71,7 @@ public void init(ConfigurationManager configurationManager) throws Exception {

super.init(configurationManager);

if (!this.isEnabled()) {
if (!isEnabled()) {
return;
}

Expand All @@ -85,11 +88,26 @@ public void init(ConfigurationManager configurationManager) throws Exception {

if (!deque.isEmpty())
return;

Server server;
int device = 0;
while ((server = startServer(device++)) != null) {
deque.add(server);

synchronized (init) {
if (!init.get()) {
try {
Server server;
int device = 0;
while ((server = startServer(device++)) != null) {
deque.add(server);
}

} catch (Exception e) {
if (hasIpedDatasource()) {
transcriptConfig.setEnabled(false);
logger.warn("Could not initialize audio transcription. Task disabled.");
} else {
throw e;
}
}
init.set(true);
}
}

logLevel = Level.DEBUG;
Expand Down
Loading

0 comments on commit fe3ae5e

Please sign in to comment.