JP5287735B2 - Information processing device - Google Patents
Information processing device Download PDFInfo
- Publication number
- JP5287735B2 JP5287735B2 JP2010003031A JP2010003031A JP5287735B2 JP 5287735 B2 JP5287735 B2 JP 5287735B2 JP 2010003031 A JP2010003031 A JP 2010003031A JP 2010003031 A JP2010003031 A JP 2010003031A JP 5287735 B2 JP5287735 B2 JP 5287735B2
- Authority
- JP
- Japan
- Prior art keywords
- module
- translation
- initialization
- language
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本発明は、複数言語間の音声翻訳を行うことができる情報処理装置に関する。 The present invention relates to an information processing apparatus capable of performing speech translation between a plurality of languages.
世界のグローバル化が進む中で、母国語が異なる人々とのコミュニケーションの機会が増えている。例えば海外旅行中のショッピングやレストランでの会話、またビジネスシーンでの会話や電話会議などである。音声翻訳技術は異なる言語間でのコミュニケーションを円滑化する技術であり、最近では多くの翻訳装置が製品化されている。 As the world becomes more globalized, opportunities for communication with people with different native languages are increasing. For example, it may be shopping or restaurant conversation during overseas travel, business conversation or telephone conference. Speech translation technology is a technology that facilitates communication between different languages, and recently, many translation devices have been commercialized.
例えば特許文献1によると、円滑なコミュニケーションを実現することができる音声翻訳装置が提案されている。この音声翻訳装置は、音声認識により得られた翻訳対象言語の文字列を表示部のエリアAに表示し、翻訳言語の文字列をエリアBに表示するとともに、翻訳対象言語の文字列または翻訳言語の文字列から文書検索のためのキーワードを抽出し、検索されたキーワード用いて検索された文書の言語が翻訳対象言語の場合、翻訳言語に翻訳し、検索された文書の言語が翻訳言語の場合、翻訳対象言語に翻訳し、検索された文書をエリアCに表示して、当該文書を翻訳した文書をエリアDに表示するものである。
For example, according to
他言語間での会話で音声翻訳を利用するには、双方向の音声翻訳が必要となる。例えば日本語と英語の双方向の音声翻訳を例に挙げると、日本語音声認識処理モジュール、日英機械翻訳処理モジュール、英語音声合成処理モジュール、ならびに英語音声認識処理モジュール、英日機械翻訳処理モジュール、日本語音声合成処理モジュールの大きく分けて6つの処理モジュールが必要となる。そして、「音声認識」、「機械翻訳」、「音声合成」の処理技術においては、言語情報や波形情報を事前に学習した辞書データを利用する手法が一般的であり、各処理を実行するには、事前に辞書データをストレージなどから読み込むなどの初期化処理が必要となる。 To use speech translation in conversations between other languages, bidirectional speech translation is required. Take bi-directional speech translation between Japanese and English as an example. Japanese speech recognition processing module, Japanese-English machine translation processing module, English speech synthesis processing module, English speech recognition processing module, English-Japanese machine translation processing module Japanese speech synthesis processing modules are roughly divided into six processing modules. In the processing technology of “speech recognition”, “machine translation”, and “speech synthesis”, it is common to use dictionary data in which linguistic information and waveform information are learned in advance. Requires an initialization process such as reading dictionary data from storage or the like in advance.
PC(Personal Computer)上でこのような翻訳技術を利用する場合など、ストレージとのデータ転送速度が速く、かつRAM(Random Access Memory)サイズが大きい環境であれば、音声翻訳アプリ起動時に全ての処理モジュールの初期化を行っても処理時間がそれほど大きくならず、辞書データによるRAMの占有も特に問題とはならない。 If such a translation technology is used on a PC (Personal Computer), if the data transfer speed with the storage is high and the RAM (Random Access Memory) size is large, all processing is performed when the speech translation application is started. Even if the module is initialized, the processing time does not increase so much, and the occupation of the RAM by the dictionary data is not particularly problematic.
しかしながら、例えば携帯端末のように、一般的に低スペックマシンにおいて音声翻訳アプリを動作させる場合には、RAMサイズが小さいため、音声翻訳アプリ起動時に全てのモジュールを初期化することができない状況が発生する。また、仮に全てのモジュールの初期化が可能なだけのRAMサイズが確保できたとしても、音声着呼やメール受信などの他のプロセスが動作する可能性があるため、RAMに適当な空き領域を確保しておく必要がある。 However, when a speech translation application is generally operated on a low-spec machine such as a portable terminal, for example, a situation occurs in which all modules cannot be initialized when the speech translation application is activated because the RAM size is small. To do. Even if a RAM size sufficient to initialize all modules can be secured, other processes such as incoming voice calls and mail reception may operate. It is necessary to secure it.
一方で、音声翻訳アプリ起動時に初期化を行うのではなく、処理を動作させるときのみ初期化を行い、処理が終了したら辞書データをRAMから解放する方法も考えられる。しかしながらこの方法では、音声翻訳アプリで音声翻訳を実行する都度、初期化処理が必要となってしまう。特に携帯端末ではデータ転送速度がPCなどに比べると遅いことが多く、また演算能力も低いため、音声翻訳を実行するためにかなりの時間を要することとなる。 On the other hand, there is also a method in which initialization is not performed when the speech translation application is activated, but initialization is performed only when the process is operated, and the dictionary data is released from the RAM when the process is completed. However, this method requires an initialization process every time voice translation is executed by the voice translation application. In particular, a portable terminal often has a slower data transfer rate than a PC or the like, and has a low calculation capability, so that a considerable amount of time is required to execute speech translation.
また、音声翻訳アプリを実現するために、RAMサイズと演算を多く要する処理を、通信網を介したサーバで実現する方法もある。しかしこの方法は通信可能な環境でないと音声翻訳を実現することができず、例えば音声翻訳が最も活躍すべき海外においては、通信できない環境も多く、通信ができるとしても割高な通信料が発生することが多い。 There is also a method for realizing processing that requires a lot of RAM size and computation in a server via a communication network in order to realize a speech translation application. However, this method cannot achieve speech translation unless the environment is communicable. For example, in overseas countries where speech translation is most active, there are many environments where communication is not possible, and even if communication is possible, a high communication fee is incurred. There are many cases.
これらのような理由により、従来、スタンドアロンで音声翻訳機能を実行する際に処理時間を短縮させることが困難であった。 For these reasons, conventionally, it has been difficult to shorten the processing time when executing the speech translation function in a stand-alone manner.
本発明は、上記課題を鑑みてなされてものであり、スタンドアロンでの音声翻訳機能を備えた情報処理装置であって、使用可能なRAMサイズに制約がある場合においても、モジュールの初期化タイミングを制御することで、音声翻訳処理時間が最小限に抑えられた情報処理装置を提供することを目的とする。 The present invention has been made in view of the above problems, and is an information processing apparatus having a stand-alone speech translation function, and the module initialization timing can be set even when the usable RAM size is limited. It is an object of the present invention to provide an information processing apparatus in which the speech translation processing time is minimized by controlling.
上記課題を解決するために、本発明に係る情報処理装置は、翻訳処理に関する複数のモジュールを有する情報処理装置であって、翻訳処理が実行される際、翻訳処理に使用できるRAMの空き領域を算出する第1の算出手段と、前記空き領域および前記複数のモジュールの各々が処理を行う際にRAMの記憶領域を占有する最大サイズと前記複数のモジュールの各々の初期化に必要なRAMの記憶領域と前記複数のモジュールの各々の初期化に要する時間とに基づいて前記複数のモジュールから初期化可能なモジュールを選択する選択手段と、前記選択手段により選択されたモジュールを翻訳処理が実行される前に初期化する第1の初期化手段と、翻訳処理の実行に伴って前記いずれかのモジュールが処理を行う際、このモジュールが前記第1の初期化手段により初期化されていなかった場合、このモジュールの処理開始時にこのモジュール初期化するとともに翻訳処理終了時に解放する第2の初期化手段と、を備えることを特徴とする。 In order to solve the above-described problem, an information processing apparatus according to the present invention is an information processing apparatus having a plurality of modules related to translation processing. When the translation processing is executed, a free RAM area that can be used for translation processing is allocated. First calculation means for calculating, a maximum size that occupies a storage area of the RAM when each of the free area and the plurality of modules performs processing, and storage of the RAM necessary for initialization of each of the plurality of modules Selection means for selecting a module that can be initialized from the plurality of modules based on the area and the time required for initialization of each of the plurality of modules, and translation processing is performed on the module selected by the selection means A first initialization unit that initializes before, and when any of the modules performs a process in accordance with the execution of the translation process, If that has not been initialized by the initialization means, characterized in that it comprises a second initialization means for releasing during translation processing ends as well as the processing start module initialization when this module.
本発明に係る情報処理装置によると、スタンドアロンでの音声翻訳機能を備えるとともに、使用可能なRAMサイズに制約がある場合においても、モジュールの初期化タイミングを制御することで、音声翻訳処理時間を最小限に抑えることが可能となる。 According to the information processing apparatus according to the present invention, the voice translation processing time can be minimized by controlling the initialization timing of the module even when there is a restriction on the usable RAM size as well as the stand-alone speech translation function. It becomes possible to limit to the limit.
本発明に係る情報処理装置の実施形態について、添付図面を参照しながら説明する。本発明に係る情報処理装置として、携帯電話機1を例に挙げて説明する。
Embodiments of an information processing apparatus according to the present invention will be described with reference to the accompanying drawings. A
図1は、携帯電話機1の斜視図である。携帯電話機1は、図1に示すように、矩形の板状の上筐体10と、この上筐体10とほぼ同形状をした下筐体11とが、閉じた状態で、相互に一面を覆うように積層されることにより形成されている。これらの上筐体10及び下筐体11は、所定方向(例えば図1のX方向)に相互に所定距離だけスライド可能なように結合されていて、上筐体10を下筐体11に対してスライドさせることにより、閉じた状態から開いた状態に、あるいは開いた状態から閉じた状態に変形する。
FIG. 1 is a perspective view of the
上筐体10の外面(下筐体11に対面しない側の面)には、データを表示する液晶ディスプレイなどの表示装置12、音声を出力するスピーカ13、音声を入力するマイクロフォン14が設けられている。また、下筐体11の内面(上筐体10に対面する側の面)には、ユーザが押下することによりデータを入力する操作キーなどの入力装置15が設けられている。
A
図2は、携帯電話機1の構成を示すブロック図である。携帯電話機1は、図2に示すように、CPU(Central Processing Unit)20、RAM(Random Access Memory)21、ROM(Read Only Memory)22、通信装置23、及び、上述した表示装置12、スピーカ13、マイクロフォン14、入力装置15がバス24によって相互に通信可能なように接続されて構成されている。
FIG. 2 is a block diagram showing the configuration of the
CPU20は、携帯電話機1の総括的な制御を行うとともに、後述する翻訳制御処理やその他の様々な処理などを行う。またCPU20は、入力装置15に対する入力インタフェースを備え、例えば入力装置15として設けられている操作キーの押下を検出すると、その操作キーに対応する処理を行う。またCPU20は、実行中のアプリケーションプログラムなどの制御に基づいて画面データを生成して表示装置12に表示する。
The
CPU20は、マイクロフォン14で集音された音声からアナログ音声信号を生成し、このアナログ音声信号をデジタル音声信号に変換する。またCPU20は、デジタル音声信号を取得すると、このデジタル音声信号をアナログ音声信号に変換し、スピーカ13から音声として出力する。
CPU20 produces | generates an analog audio | voice signal from the audio | voice collected with the
RAM21は、CPU20が処理を行う際の作業領域として一時的にデータを記憶する記憶装置である。ROM22は、CPU20が処理を行う際の処理プログラム(翻訳制御処理の処理プログラムなど)、処理に使用されるデータ(後述するモジュールリスト情報40など)などを記憶する記憶装置である。音声翻訳に使用される辞書データも、予めROM22に記憶されているものとする。携帯電話機1は、ROM22に加えて、ハードディスク、不揮発性メモリなどの記憶装置を備えていても良く、モジュールリスト情報40などは、ROM22でなくそれらの記憶装置に記憶されていても良い。
The
通信装置23は、CPU20の制御に基づいて、基地局(図示せず)からアンテナ23aを介して受信した受信信号をスペクトラム逆拡散処理してデータを復元する。このデータは、CPU20の制御によりスピーカ13から出力されたり、表示装置12に表示されたり、またはRAM21に記録されたりする。また通信制御部26は、CPU20の制御に基づいて、マイクロフォン14で集音された音声データや表示装置12や入力装置15を介して入力されたデータやRAM21またはROM22に記憶されたデータを取得すると、これらのデータに対してスペクトラム拡散処理を行い、基地局に対してアンテナ23aを介して送信する。
Based on the control of the
携帯電話機1は、スタンドアロンで例えば言語Aを言語Bに翻訳したり言語Bを言語Aに翻訳したりする音声翻訳機能を備えている。さらに携帯電話機1は、翻訳制御処理を行う際に、翻訳制御に使用される各々のモジュールの初期化処理に必要なRAM21のRAMサイズ、各々のモジュールの演算処理に必要なRAMサイズ、各々のモジュールの初期化処理に要する時間、及びRAM21の空きRAMサイズに基づいて、各々のモジュールの初期化処理のタイミングを制御する機能を備えていて、これにより、RAM21の空きRAMサイズが制限されている場合であっても音声翻訳処理時間を最小限に抑えることができる。
The
そして、CPU20は、言語Aを言語Bに翻訳するモジュールとして言語A音声認識部30、A−B機械翻訳部31、言語B音声合成部32を備えているとともに、言語Bを言語Aに翻訳するモジュールとして言語B音声認識部33、B−A機械翻訳部34、言語A音声合成部35を備えている。
The
言語A音声認識部30は、マイクロフォン14に言語Aの音声が入力されると、入力された音声を示す言語Aの文章を生成する。A−B機械翻訳部31は、生成された言語Aの文章を言語Bの文章に機械翻訳する。言語B音声合成部32は、機械翻訳された文章に基づいて音声を合成して、出力用の音声データを生成する。
When the language A speech is input to the
言語B音声認識部33は、マイクロフォン14に言語Bの音声が入力されると、入力された音声を示す言語Bの文章を生成する。B−A機械翻訳部34は、生成された言語Bの文章を言語Aの文章に機械翻訳する。言語A音声合成部35は、機械翻訳された文章に基づいて音声を合成して、出力用の音声データを生成する。
When the language B speech is input to the
一例として、言語A(日本語)から言語B(英語)に音声翻訳する場合の動作を簡単に説明する。例えばユーザが日本語で『もうすこし安くして下さい』と発話したとすると、言語A音声認識部30は音声波形を音声認識して文字列「もうすこし安くして下さい」を生成して表示装置12に表示させる。図3は、携帯電話機1が翻訳制御処理を行う際に表示装置12に表示させる画面の一例を示す図である。図3に示すように、言語A音声認識部30は、表示装置12の画面12aにおける翻訳前言語表示欄12bに、音声認識された文字列を表示させる。また、A−B機械翻訳部31は、図3に示すように、生成された文字列を英語に機械翻訳して「Please make it a little cheaper」の文字列を生成して、画面12aの翻訳後言語表示欄12cに表示させる。言語B音声合成部32は、機械翻訳された文字列に基づいて音声合成し、『Please make it a little cheaper』の文字列を音声として出力させる。
As an example, an operation for speech translation from language A (Japanese) to language B (English) will be briefly described. For example, if the user utters “Please make it a little cheaper” in Japanese, the language A
英語から日本語に音声翻訳する場合は、上記の逆の処理が実行される。なお、携帯電話機1において、日本語から英語に音声翻訳する処理と、英語から日本語に音声翻訳する処理とが並列に動作することはない。
In the case of speech translation from English to Japanese, the above reverse processing is executed. Note that in the
言語A音声認識部30、A−B機械翻訳部31、言語B音声合成部32、言語B音声認識部33、B−A機械翻訳部34、言語A音声合成部35は、処理を行う際、RAM21において、それぞれ辞書データを読み込むための記憶領域(初期化用のRAM)と演算処理を行うための記憶領域(演算用のRAM)を占有する必要がある。演算処理前に予め初期化を実行しておくことで、その後の処理を高速に実行することが可能だが、その場合にはその分のRAM21の記憶領域を占有し続けることになる。一方、予め初期化を実行しない場合、辞書データによりRAM21の記憶領域を占有し続けることは回避されるが、処理を行う都度に初期化が必要となるため処理時間が長くなる。
When the language A
ROM22は、CPU20が翻訳制御処理を行う際に使用されるモジュールがリスト化されたモジュールリスト情報40を記憶している。図4は、モジュールリスト情報40の一例を示すデータ構成図である。図4に示すように、モジュールリスト情報40は、各々のモジュール情報40aに対して、処理の種類を示す種類情報40b、RAMにおいてモジュールが処理を行う際に使用される記憶領域の最大サイズ(ピークRAMサイズ)を示すRAMサイズ情報40cがそれぞれ対応付けられた情報である。なお、モジュールが処理を行う際には、そのモジュールの本来の処理である演算処理に必要なデータをROM22からRAM21に展開する初期化処理を行う必要があるため、処理の種類は、この「初期化」処理と、モジュールの本来の処理である「演算」処理との2種類である。
The
具体的には、初期化用の言語A音声認識部30(ASR_A)の初期化に対して「M_Aa」のRAMサイズが、演算用の言語A音声認識部30(ASR_A)の演算に対して「M_Aa_w」のRAMサイズがそれぞれ対応付けられている。また、A−B機械翻訳部31(MT_AB)の初期化に対して「M_Ma」のRAMサイズが、A−B機械翻訳部31(MT_AB)の演算に対して「M_Ma_w」のRAMサイズがそれぞれ対応付けられている。また、言語B音声合成部32(TTS_B)の初期化に対して「M_Ta」のRAMサイズが、言語B音声合成部32(TTS_B)の演算に対して「M_Ta_w」のRAMサイズがそれぞれ対応付けられている。 Specifically, the RAM size of “M_Aa” for initialization of the language A speech recognition unit 30 (ASR_A) for initialization is “0” for the computation of the language A speech recognition unit 30 (ASR_A) for computation. The RAM sizes of “M_Aa_w” are associated with each other. The RAM size of “M_Ma” corresponds to the initialization of the AB machine translation unit 31 (MT_AB), and the RAM size of “M_Ma_w” corresponds to the operation of the AB machine translation unit 31 (MT_AB). It is attached. The RAM size of “M_Ta” is associated with the initialization of the language B speech synthesizer 32 (TTS_B), and the RAM size of “M_Ta_w” is associated with the operation of the language B speech synthesizer 32 (TTS_B). ing.
同様に、言語B音声認識部33、B−A機械翻訳部34、言語A音声合成部35に対しても、初期化処理と演算処理のそれぞれに必要なRAMサイズが対応付けられている。
Similarly, the language B
また、ROM22は、各モジュールの初期化時間が記された初期化時間情報41を記憶している。図5は、初期化時間情報41の一例を示すデータ構成図である。図5に示すように、初期化時間情報41では、各々のモジュールを示すモジュール情報40aに対して、初期化処理に要する時間が対応付けられている。
The
図6は、言語Aから言語Bへ音声翻訳するときに用いられる各々のモジュールの初期化タイミングのパターンを示す初期化パターン情報42の一例(例えば言語Aから言語Bに翻訳するモジュールの初期化タイミングのパターン)を示すデータ構成図である。図6に示すように、初期化パターン情報42は、各々のパターン識別情報42aに対して、言語A音声認識部30を事前初期化するか否かを示す事前初期化可否情報42b、A−B機械翻訳部31を事前初期化するか否かを示す事前初期化可否情報42c、言語B音声合成部32を事前初期化するか否かを示す事前初期化可否情報42d、ピークRAMサイズ情報42e、各々のモジュールを演算時に初期化する際にかかる時間を示す追加処理時間情報42fがそれぞれ対応付けられた情報である。
FIG. 6 shows an example of initialization pattern information 42 indicating the initialization timing pattern of each module used when speech translation is performed from language A to language B (for example, initialization timing of a module that translates from language A to language B). FIG. As shown in FIG. 6, the initialization pattern information 42 includes
初期化パターン情報42には、言語Aから言語Bへ音声翻訳するときに用いられる各モジュールの事前初期化要否の組み合わせとして考えられる全てのパターンについて、ピークRAMサイズと、モジュール演算処理実行時に初期化を行うために要する時間(追加処理時間)とが登録されている。図6では、事前初期化を行うモジュールの事前初期化可否情報を「○」、事前初期化を行わないモジュールの事前初期化可否情報を「×」で表している。なお、図示しないが、言語Bから言語Aへ音声翻訳する場合の初期化パターン情報も、言語Aから言語Bへ音声翻訳する場合の初期化パターンと同様に予め記憶されている。ここで、事前の初期化とは、音声翻訳機能の開始時に、前もって行われるモジュールの初期化である。 The initialization pattern information 42 includes a peak RAM size and an initial value at the time of execution of module calculation processing for all patterns that can be considered as combinations of necessity of pre-initialization of each module used when speech translation from language A to language B is performed. The time (additional processing time) required for the conversion is registered. In FIG. 6, the pre-initialization availability information of a module to be pre-initialized is represented by “◯”, and the pre-initialization availability information of a module that is not pre-initialized is represented by “×”. Although not shown, initialization pattern information for speech translation from language B to language A is also stored in advance, as is the initialization pattern for speech translation from language A to language B. Here, the prior initialization is module initialization that is performed in advance at the start of the speech translation function.
言語Aから言語Bへの翻訳制御処理を実行する際のピークRAMサイズと追加処理時間について説明する。音声翻訳処理において、モジュールの初期化処理を事前に行った場合、その初期化処理に用いたRAM21の記憶領域は、各モジュールの演算処理実行時にもそのまま占有される。そのため、事前に初期化するモジュールが多いほど、多くのRAM21の記憶領域が必要となる。初期化パターン情報42のピークRAMサイズは、各パターンで処理した場合の音声翻訳処理全体の中で必要となるRAMの最大値を表している。音声翻訳処理においては、上述のとおり音声認識完了後に機械翻訳を実行し、機械翻訳完了後に音声合成が実行されるため、各モジュールは並列動作しない。そのため、ピークRAMサイズは、各モジュールの演算処理にかかるRAMサイズの内の最大値と、事前初期化を行う全てのモジュールの初期化に必要なRAMサイズの合計として算出される。
The peak RAM size and the additional processing time when executing the translation control process from language A to language B will be described. In the speech translation process, when the module initialization process is performed in advance, the storage area of the
一方、事前に初期化されないモジュールは、各モジュールの演算処理を行う都度、初期化される。そのため、事前に初期化されないモジュールが多いほど、各モジュールの演算処理を行う都度発生する追加の初期化のための処理時間が必要となる。初期化パターン情報42の追加処理時間は、音声翻訳処理全体の中で、追加の初期化処理のための処理時間の合計時間を表している。つまり、追加処理時間は、事前に初期化されないモジュールの初期化処理に要する時間として算出される。 On the other hand, modules that are not initialized in advance are initialized each time the arithmetic processing of each module is performed. Therefore, the more modules that are not initialized in advance, the more processing time is required for additional initialization that occurs each time the arithmetic processing of each module is performed. The additional processing time of the initialization pattern information 42 represents the total processing time for the additional initialization processing in the entire speech translation processing. That is, the additional processing time is calculated as the time required for the initialization processing of the module that is not initialized in advance.
例えば、初期化パターン情報42に登録された各パターンの中で、RAM21の記憶領域を最も多く占有するパターンは、全てのモジュールが事前に初期化するパターン(図6のパターン1)であり、これは、各モジュールが演算処理を行う際のRAM21の使用量の最大値max{M_Aa_w,M_Ma_w,M_Ta_w}=M_wと定義すると、ピークRAMサイズM_Pk_maxは「M_Aa+M_Ma+M_Ta+M_w」となる。また、各モジュールによる演算処理を行うときの追加の初期化の処理が必要無いため、追加処理時間Tpa1は0となる。
For example, among the patterns registered in the initialization pattern information 42, the pattern that occupies the most storage area of the
これに対して、全てのモジュールが事前に初期化されないパターン(図6のパターン8)では、初期化によってRAMが占有されない。そのため、ピークRAMサイズは、「Mpa8=max{M_Aa+M_Aa_w,M_Ma+M_Ma_w,M_Ta+M_Ta_w}」である。一方、各モジュールの演算処理実行時に初期化を行うため、追加処理時間が「Tpa8=T_Aa+T_Ma+T_Ta」となる。
On the other hand, in the pattern in which all modules are not initialized in advance (
初期化パターンは、初期化パターン情報42に記憶されたピークRAMサイズと追加処理時間の情報と、翻訳制御処理のために使用できる空きRAMサイズに基づいて選択される。 The initialization pattern is selected based on the peak RAM size and additional processing time information stored in the initialization pattern information 42 and the free RAM size that can be used for the translation control process.
RAM21の記憶領域における空きRAMサイズを「M_Free」、翻訳制御処理の実行時に他のアプリのために最低限確保しておくRAMサイズを「M_etc」と定義すると、翻訳制御処理のために使用できる空きRAMサイズM_maxは「M_Free−M_etc」と定義する。
If the free RAM size in the storage area of the
言語Aから言語Bへの音声翻訳に必要なピークRAMサイズM_Pk_maxが空きRAMサイズM_maxよりも小さければ、音声翻訳を行う前に、事前に全モジュールの初期化処理を実行しておくことが可能なので、パターン1により最小の処理時間で翻訳制御処理を実行することができる。しかしながら、ピークRAMサイズM_Pk_maxが空きRAMサイズM_maxよりも小さい場合は、モジュールを全て事前に初期化しておくことはできないため、一部のモジュールのみを事前に初期化しておくことになる。この場合、ピークRAMサイズは小さくなるが、事前初期化を行っていないモジュールの初期化処理に要する時間の分だけ処理時間が長くなるため、全てのモジュールを初期化した場合よりも処理時間が長くなる。
If the peak RAM size M_Pk_max required for speech translation from language A to language B is smaller than the free RAM size M_max, it is possible to execute initialization processing for all modules in advance before speech translation. By using
以下、各々のモジュールの初期化のタイミングを制御することにより処理時間を最小化するために、事前初期化を行うモジュールの選択方法について説明する。携帯電話機1で翻訳制御処理を行う際、空きRAMサイズに応じて、いずれのモジュールを事前初期化するかどうか選択する。言語Aから言語Bに翻訳するための3種類のモジュールについて考えると、事前初期化有無を決定するためのパターンは初期化パターン情報42に示すようにパターン1乃至パターン8の8パターンある。
Hereinafter, in order to minimize the processing time by controlling the timing of initialization of each module, a method for selecting a module to be pre-initialized will be described. When the translation control processing is performed by the
事前に初期化するモジュール、演算処理を実行するタイミングで初期化するモジュールをそれぞれ選別する初期化処理の最適化は、初期化パターン情報42に基づいて以下の手順で行われる。
(1)空きRAMサイズM_maxを算出する。
(2)パターン1乃至パターン8(Mpa1〜MPa8)から、ピークRAMサイズが空きRAMサイズM_max以下であるパターンを選出する。
(3)上記(2)で選出されたパターンのうち、追加処理時間(Tpa1〜Tpa8)が最小のパターンを選択する。
The optimization of the initialization process for selecting the module to be initialized in advance and the module to be initialized at the timing of executing the arithmetic process is performed based on the initialization pattern information 42 in the following procedure.
(1) The free RAM size M_max is calculated.
(2) A pattern whose peak RAM size is equal to or less than the free RAM size M_max is selected from
(3) Of the patterns selected in (2) above, select the pattern with the shortest additional processing time (Tpa1 to Tpa8).
携帯電話機1が各々のモジュールの初期化のタイミングを最適化しつつ翻訳処理を行う翻訳制御処理の手順について、図7、図8、図10に示すフローチャートに基づいて詳細に説明する。なお、最初に言語Aから言語Bへの翻訳を行う場合を例に挙げて説明する。
The procedure of the translation control process in which the
図7は、携帯電話機1が翻訳制御処理を行う際の全体の手順を示すフローチャートであり、図8は、携帯電話機1が事前初期化処理を行う際の手順を示すフローチャートである。図7に示すように、まずCPU20は、言語Aから言語Bへの翻訳を行う各々のモジュールについて、事前初期化処理を行う(S101)。この事前初期化処理について、図8に示すフローチャートに基づいて説明する。
FIG. 7 is a flowchart showing an overall procedure when the
CPU20はまず空きRAMサイズ(M_max)を算出する(S201)。またCPU20は、追加処理時間の最小値(Tmin)を初期値「無限大(∞)」に設定するとともに、パターンの計数のための変数iに初期値「1」を、最適なパターンを示す変数nに初期値「0」を設定する(S203)。ここで、初期値「無限大」は十分に大きな値を意味するものであり、より具体的にはTpa8よりも大きな値であれば良い。
The
CPU20は、パターンiのピークRAMサイズ(Mpa(i))が、空きRAMサイズ(M_max)より小さいかどうかを判断する(S205)。このときCPU20は、例えば変数iが「1」の場合にはパターン1のピークRAMサイズについて判断する。パターンiのピークRAMサイズが空きRAMサイズよりも小さい場合(S205のYes)、CPU20は、パターンiの追加処理時間(Tpa(i))が追加処理時間の最小値Tminよりも小さいか否かを判断する(S207)。
The
パターンiの追加処理時間(Tpa(i))が追加処理時間の最小値Tminよりも小さい場合(S207のYes)は、CPU20は、追加処理時間の最小値(Tmin)にパターンiの追加処理時間(Tpa(i))を設定する(S209)。追加処理時間の最小値が無限大に設定されている場合には、必ずこのときのパターンiの追加処理時間が追加処理時間の最小値に設定される。そしてCPU20は、変数nにこのときの「i」を設定する(S211)。変数nは最適なパターンを示す変数であり、変数nに「i」を設定することにより現時点でパターンiが最適であることを意味する。
When the additional processing time (Tpa (i)) of the pattern i is smaller than the minimum value Tmin of the additional processing time (Yes in S207), the
パターンiのピークRAMサイズが空きRAMサイズ以上であった場合(S205のNo)、パターンiの追加処理時間(Tpa(i))が追加処理時間の最小値以上であった場合(S207のNo)、またはステップS209及びS211の処理を完了した後、CPU20は、変数iに「1」を加算する(S213)。
When the peak RAM size of the pattern i is equal to or larger than the free RAM size (No in S205), and when the additional processing time (Tpa (i)) of the pattern i is equal to or larger than the minimum value of the additional processing time (No in S207) Alternatively, after completing the processes of steps S209 and S211, the
またCPU20は、変数iがパターンの総数である「8」より大きいか否かを判断する(S215)。変数iが8以下であった場合(S215のNo)、すなわち全てのパターンについてステップS205乃至S211の処理を行っていない場合は、ステップS205に戻って、CPU20はステップS205乃至S215の処理を行う。
Further, the
変数iが8より大きい場合(S215のYes)、すなわち全てのパターンについてステップS205乃至S211の処理を行った場合は、CPU20は、変数nが0より大きいか否かを判断する(S217)。変数nが「0」の場合には、最適なパターンが選択されておらず、事前初期化を行えないからである。
When the variable i is greater than 8 (Yes in S215), that is, when the processes of Steps S205 to S211 have been performed for all patterns, the
変数nが0より大きい場合(S217のYes)は、CPU20は初期化パターン情報42に基づいて、パターンnの初期化を実行する(S219)。このとき、例えば変数nが「1」であった場合は、CPU20は、初期化パターン情報42のパターン1に基づいて、言語A音声認識部30、A−B機械翻訳部31、言語B音声合成部32を初期化し、パターン2が選択された場合は、言語A音声認識部30、A−B機械翻訳部3を初期化する。
When the variable n is larger than 0 (Yes in S217), the
またこのとき、CPU20は、各々のモジュールの初期化状態を示す初期化状態情報44に、各々のモジュールの初期化状態を記憶する(S221)。図9(A)は、識別符号と初期化状態との関係を示す対応表であり、図9(B)は、初期化状態情報44の一例を示すデータ構成図である。図9(A)に示すように、モジュールを事前初期化すべきでないが初期化されている状態に識別符号「−1」が、モジュールを事前初期化しない状態に識別符号「0」が、モジュールを事前初期化すべきだがまだされていない状態に識別符号「1」が、モジュールが既に事前初期化されている状態に識別符号「2」がそれぞれ割り当てられている。
At this time, the
識別符号「−1」は、むやみに解放処理が行われないための識別符号である。例えば、一般的にモジュールが実行された後には即座にメモリの使用領域が解放されるが、このモジュールが繰り返し使用される可能性がある場合には何度も初期化を繰り返すのは非効率的である。そこで、繰り返し使用される可能性の高いモジュールに対して識別符号「−1」を設定しておき、別のモジュールが実行されるタイミングで当該モジュールを解放するようにすることにより、無駄な初期化処理を省くことができる。 The identification code “−1” is an identification code for unnecessarily performing the release process. For example, memory usage is generally released immediately after a module is executed, but if this module is likely to be used repeatedly, it is inefficient to repeat initialization many times. It is. Therefore, by setting an identification code “−1” for a module that is likely to be used repeatedly, and releasing the module at the timing when another module is executed, wasteful initialization is performed. Processing can be omitted.
そして、選択されたパターンに基づいて、モジュールの事前初期化を行わないが初期化されているモジュール(予め識別符号に「−1」が設定されていたモジュール)には「−1」が、モジュールの事前初期化を行わないモジュールには「0」が、既に事前初期化を行ったモジュールには「2」が設定される。また、例えば「A言語からB言語」と「B言語からA言語」の双方向の翻訳を行う場合に、双方向分のモジュールのパターンが選択されたが、この時点で1方向のみの事前初期化が行われた場合などで、事前初期化を行うべきだが現時点で行われていないモジュールには「1」が設定される。 Then, based on the selected pattern, the module is not pre-initialized but is initialized (the module whose identification code is set to “−1” in advance) is “−1”, the module “0” is set for a module that is not pre-initialized, and “2” is set for a module that has already been pre-initialized. In addition, for example, when performing bidirectional translation from “A language to B language” and “B language to A language”, a module pattern for bidirectional is selected. For example, “1” is set for a module that should be pre-initialized but not currently performed.
図9(B)に示すように、初期化状態情報44では、モジュール情報44aに対して初期化状態を示す状態情報44bがそれぞれ対応付けられている。なお、状態情報44bは上述した識別符号で記されている。例えば図9(B)によると、言語A音声認識部30(ASR_A)に識別符号「2」(初期化されている状態)が、A−B機械翻訳部31(MT_AB)に識別符号「1」(初期化すべきだけどされていない状態)が対応付けられている。CPU20は、ステップS221にて各々のモジュールについて状態情報44bを更新する。
As shown in FIG. 9B, in the
このようにしてCPU20は、各々のモジュールに対して事前初期化処理を行った後、ユーザにより終了が指示されたか否かを判断する(S103)。このときCPU20は、例えば入力装置15を介する所定の入力に基づいて、終了が指示されたものと判断する。終了が指示された場合(S103のYes)は、CPU20は翻訳制御処理を終了する。
In this manner, the
終了が指示されていない場合(S103のNo)は、CPU20は、翻訳方向の切替が指示されたか否かを判断する(S105)。このときCPU20は、例えば入力装置15を介する所定の入力に基づいて、言語Aから言語Bへの翻訳から、言語Bから言語Aへの翻訳に切り替えられた場合に、切替が指示されたものと判断する。
If termination is not instructed (No in S103), the
翻訳方向の切替が指示されていない場合(S105のNo)は、CPU20は、言語Aから言語Bに翻訳を行うために、ユーザにより発話されたか否かを判断する(S107)。ユーザは、例えば画面12aに表示された認識開始/終了ボタン12を選択することにより携帯電話機1に音声認識の開始を指示し、認識開始/終了ボタン12を再び選択することにより音声認識の終了を指示する。CPU20は、例えばこのボタンの選択に基づいて発話されたか否かを判断する。
When the switching of the translation direction is not instructed (No in S105), the
発話された場合(S107のYes)は、CPU20は、言語A音声認識部30により言語Aの音声認識を行う(S109)。例えばユーザが言語A(日本語)で「こんにちは」と発話した場合には、CPU20は「こんにちは」の文字列を生成する。そしてCPU20は、機械翻訳処理を実行することを示すユーザ操作を検出した場合に、A−B機械翻訳部31により、ステップS109にて音声認識された文字列を言語Aから言語Bに機械翻訳する(S111)。例えば音声認識により「こんにちは」の文字列が生成された場合には、CPU20は「こんにちは」を言語B(英語)に機械翻訳して「Hello」の文字列を生成する。
When the utterance is made (Yes in S107), the
この際、画面12aの翻訳前言語表示欄12bに音声認識された文字列である「こんにちは」の文字列が表示されると良い。また、画面12aの翻訳後言語表示欄12cに機械翻訳された文字列である「Hello」の文字列が表示されると良い。
In this case, a voice recognition string to the translation
CPU20は、音声合成処理を実行することを示すユーザ操作を検出した場合に、言語B音声合成部32により、ステップS111にて機械翻訳された文字列について音声合成して音声データを生成する(S113)。例えば生成された文字列が「Hello」であった場合には「Hello」の言葉を発する音声データが生成される。そしてCPU20は、生成された音声データの出力を示すユーザ操作を検出した場合に、ステップS113にて生成された音声データをスピーカ13により音声出力する(S115)。ユーザは、例えば画面12aに表示された出力開始ボタン12eを選択することにより、携帯電話機1に音声出力の開始を指示する。CPU20は、このボタンが選択されたことに基づいて音声出力を開始すると良い。その後、ステップS103に戻って、CPU20は再び終了が指示されたか否かを判断する。
When the
一方、翻訳方向の切替が指示された場合(S105のNo)は、CPU20は、翻訳方向を切り替え、言語Bから言語Aへの翻訳を行う各々のモジュールに対して、ステップS201乃至S221に示す事前初期化処理を行う(S117)。その後、CPU20はユーザにより終了が指示されたか否かを判断する(S119)。このときCPU20は、例えば入力装置15を介する所定の入力に基づいて、終了が指示されたものと判断する。終了が指示された場合(S119のYes)は、CPU20は翻訳制御処理を終了する。
On the other hand, when switching of the translation direction is instructed (No in S105), the
終了が指示されていない場合(S119のNo)は、CPU20は、翻訳方向の切替が指示されたか否かを判断する(S121)。このときCPU20は、例えば入力装置15を介する所定の入力に基づいて、言語Bから言語Aへの翻訳から、言語Aから言語Bへの翻訳に切り替えられた場合に、切替が指示されたものと判断する。翻訳方向の切替が指示された場合(S121のYes)は、ステップS101に戻って、CPU20は、翻訳方向を切り替え、言語Aから言語Bへの翻訳を行う各々のモジュールに対して事前初期化を行う。
If termination is not instructed (No in S119), the
翻訳方向の切替が指示されていない場合(S121のNo)は、CPU20は、言語Bから言語Aに翻訳を行うために、ユーザにより発話されたか否かを判断する(S123)。ユーザは、例えば画面12aに表示された認識開始/終了ボタン12を選択することにより携帯電話機1に音声認識の開始を指示し、認識開始/終了ボタン12を再び選択することにより音声認識の終了を指示する。CPU20は、例えばこのボタンの選択に基づいて発話されたか否かを判断する。
When switching of the translation direction is not instructed (No in S121), the
発話された場合(S123のYes)は、CPU20は、言語B音声認識部33により、言語Bの音声認識を行う(S125)。例えばユーザが言語B(英語)で「Hello」と発話した場合には、CPU20は「Hello」の文字列を生成する。そしてCPU20は、機械翻訳処理を実行することを示すユーザ操作を検出した場合に、B−A機械翻訳部34により、ステップS125にて音声認識された文字列を言語Bから言語Aに機械翻訳する(S127)。例えば音声認識により「Hello」の文字列が生成された場合には、CPU20は「Hello」を言語A(日本語)に機械翻訳して「こんにちは」の文字列を生成する。
When the utterance is made (Yes in S123), the
CPU20は、音声合成処理を実行することを示すユーザ操作を検出した場合に、言語A音声合成部35により、ステップS127にて機械翻訳された文字列について音声合成して、音声データを生成する(S129)。例えば生成された文字列が「こんにちは」であった場合には「こんにちは」の言葉を発する音声データが生成される。そしてCPU20は、生成された音声データの出力を示すユーザ操作を検出した場合に、ステップS129にて生成された音声データをスピーカ13により音声出力する(S131)。ユーザは、例えば画面12aに表示された出力開始ボタン12eを選択することにより、携帯電話機1に音声出力の開始を指示する。CPU20は、このボタンが選択されたことに基づいて音声出力を開始すると良い。その後、ステップS119に戻って、CPU20は再び終了が指示されたか否かを判断する。
When the
なお、CPU20は、上述したステップS109、S111、S113、S125、S127、S129の各々の処理(演算処理)をユーザの入力操作に応じて行うとして説明したが、ユーザの入力操作がなかった場合には、各々の処理を実行せずに次のステップの処理に進むようにしても良い。また、ユーザの入力操作に基づかず、自動的に機械翻訳、音声合成、音声出力を実行しても良い。 In addition, although CPU20 demonstrated that each process (arithmetic process) of step S109, S111, S113, S125, S127, S129 mentioned above was performed according to a user's input operation, when there is no user's input operation, May proceed to the processing of the next step without executing each processing. Further, machine translation, speech synthesis, and speech output may be automatically executed without being based on a user input operation.
また、CPU20は、上述したステップS109、S111、S113、S125、S127、S129の各々の処理(演算処理)を行う際に、各々のモジュールの初期化状態に応じて初期化処理を行う。図10は、携帯電話機1が翻訳制御処理を行う際の、演算処理時の初期化処理の手順を示すフローチャートである。例えばステップS109にて言語A音声認識部30が音声認識を行う場合について説明する。
Further, the
図10に示すように、CPU20は、初期化状態情報44に基づいて言語A音声認識部30のモジュールの初期化状態を判断する(S301)。状態情報44bが「0」の場合(S301の「0」)は、言語A音声認識部30のモジュールが事前初期化されずに演算時に初期化されるべきモジュールであるため、CPU20は音声A音声認識部30のモジュールを初期化する(S302)。
As shown in FIG. 10, the
状態情報44bが「1」の場合(S301の「1」)は、言語A音声認識部30のモジュールが事前初期化されるべきモジュールであるが現時点では初期化されていないため、CPU20は言語A音声認識部30のモジュールを初期化する(S303)。そしてCPU20は、言語A音声認識部30が初期化されたので、初期化状態情報44において、言語A音声認識部30の状態情報44bを「2」に設定する(S304)。
When the
状態情報44bが「2」の場合(S301の「2」)は、言語A音声認識部30のモジュールが事前初期化されるべきモジュールであり既に事前初期化されているため、CPU20は初期化を行わずに次のステップに進む。また、状態情報44bが「−1」の場合(S301の「−1」)は、言語A音声認識部30のモジュールが事前初期化されるべきでないモジュールであるが既に初期化されているため、CPU20は初期化を行わずに次のステップに進む。
When the
そしてCPU20は、言語A音声認識部30に演算処理(すなわち音声認識処理)を実行させる(S305)。演算処理の実行後に、CPU20は、再びステップS301と同様に、言語A音声認識部30のモジュールの初期化状態を判断する(S307)。
Then, the
状態情報44bが「0」の場合(S307の「0」)は、言語A音声認識部30のモジュールがステップS302にて初期化されたので、初期化によりRAM21に展開されたデータをRAM21から削除することにより言語A音声認識部30のモジュールを解放する(S309)。一方、状態情報44bが「−1」または「2」の場合(S307の「−1」、「2」)は、CPU20は、言語A音声認識部30のモジュールを解放せずに処理を終了する。なお、識別符号「−1」が設定されているモジュールは、別のモジュールが実行されるタイミングで解放されると良い。
When the
このようなステップS301乃至S309の処理が、言語A音声認識部30、A−B機械翻訳部31、言語B音声合成部32、言語B音声認識部33、B−A機械翻訳部34、言語A音声合成部35の各々のモジュールが処理を実行する毎に行われる。
Such processing in steps S301 to S309 is performed by the language A
以上のように、音声翻訳に利用できる空きRAMサイズと音声翻訳の各モジュールを事前初期化するときに必要なRAMサイズとの関係および、各モジュールを事前に初期化しなかった場合に追加で必要となる処理時間に基づいて、各モジュールを事前に初期化するか否かを決定する。これによって、限られたRAMサイズであっても、より少ない処理時間で音声翻訳を実行することができる。 As described above, the relationship between the free RAM size that can be used for speech translation and the RAM size required when pre-initializing each speech translation module, and additionally required if each module is not pre-initialized Whether to initialize each module in advance is determined based on the processing time. As a result, even with a limited RAM size, speech translation can be executed with less processing time.
以上のような初期化処理判断処理に対して各々のモジュールの利用頻度を利用することにより、翻訳制御処理の処理時間を更に短縮することができる。図11は、各々のモジュールの使用履歴が記録された履歴情報45の一例を示すデータ構成図である。図11に示すように、履歴情報45は、例えば最近実行されたモジュールが過去100回分について記憶された情報である。CPU20は、いずれかのモジュールが実行される毎に(ステップS109、S111、S113、S125、S127、S129の各々の処理が行われる場合など)、履歴情報45に実行されたモジュールを記憶しておく。そして、この履歴情報45に基づいて各モジュールの利用頻度が決定される。
By using the frequency of use of each module for the initialization process determination process as described above, the processing time of the translation control process can be further shortened. FIG. 11 is a data configuration diagram showing an example of the
図12は、初期化パターンの付加情報46の一例を示すデータ構成図である。図12に示すように、初期化パターンの付加情報46は、初期化パターン情報42と共通の各々のパターン識別情報46aに対して、言語A音声認識部30の利用頻度の比率を示す利用頻度情報46b、A−B機械翻訳部31の利用頻度の比率を示す利用頻度情報46c、言語B音声合成部32の利用頻度の比率を示す利用比率情報46d、利用頻度を反映させた追加処理時間である拡張追加処理時間を示す拡張追加処理時間情報46eがそれぞれ対応付けられた情報である。拡張追加処理時間は各モジュールの追加処理時間に頻度比率を重み付けした総和であり、各モジュールの利用頻度を利用する場合には、拡張追加処理時間が最小になるようにパターンが選択される。
FIG. 12 is a data configuration diagram showing an example of the
例えば図12によると、言語A音声認識部30の利用頻度の比率が「R_Aa」、A−B機械翻訳部31の利用頻度の比率が「R_Ma」、言語B音声合成部32の利用頻度の比率が「R_Ta」と定義されている。また、パターン1〜パターン8の拡張追加処理時間Tpa’〜Tpa8’が定義されている。
For example, according to FIG. 12, the usage frequency ratio of the language A
例えば、M_Aa=10MB、M_Ma=10MB、M_Ta=1MB、T_Aa=8秒、T_Ma=4秒、T_Ta=1秒、M_Aa_w=5MB、M_Ma_w=4MB、M_Ta_w=3MBである場合について考える。各々のモジュールの利用頻度を利用しない場合、空きRAMサイズM_maxが16MBの場合、メモリ制約から選択されるパターンはパターン3とパターン5である。翻訳処理実行時の追加処理時間はパターン3でTpa3=4秒、パターン5でTpa5=8秒なので、追加処理時間が最小となるのはパターン3である。つまり、追加処理時間を多く要する言語A音声認識部30(8秒)を事前に初期化しておき、A−B機械翻訳部31の初期化(4秒)は、機械翻訳処理が必要なタイミングで実行する、という処理手順が選択される。
For example, consider the case where M_Aa = 10 MB, M_Ma = 10 MB, M_Ta = 1 MB, T_Aa = 8 seconds, T_Ma = 4 seconds, T_Ta = 1 second, M_Aa_w = 5 MB, M_Ma_w = 4 MB, and M_Ta_w = 3 MB. When the usage frequency of each module is not used,
しかし、例えばユーザが音声認識により得られた文字列をテキストエディタなどで編集し、これに対して機械翻訳を行わせる処理を繰り返すような状況を想定すると、機械翻訳の初期化(4秒)を何度も繰り返すのは効率が悪い。この非効率的な追加処理時間を軽減するために、各モジュールの頻度比率が用いられる。 However, for example, assuming a situation where a user edits a character string obtained by speech recognition with a text editor and repeats the process of performing machine translation on the text string, initialization of machine translation (4 seconds) is performed. Repeating many times is inefficient. In order to reduce this inefficient additional processing time, the frequency ratio of each module is used.
例えば上記ケースにおいて、言語A音声認識部30、A−B機械翻訳部31、言語B音声合成部32の各頻度比率がそれぞれR_Aa=0.1、R_Ma=0.8、R_Ta=0.1であるとすると、拡張追加処理時間はパターン3で、Tpa3’=4*0.8=3.2秒、パターン5でTpa5’=8*0.1=0.8秒なので、最小のものはパターン5となる。このように、ユーザの利用ケースに自動適応して、各モジュールの初期化処理のタイミングを最適化することができる。
For example, in the above case, the frequency ratios of the language A
なお、各モジュールの追加処理時間に頻度比率を重み付けする方法は、上述した方法に限定されず、最近の履歴ほど重みを大きくなるような重み付け和で頻度比率を算出する方法であっても良い。 Note that the method of weighting the frequency ratio to the additional processing time of each module is not limited to the above-described method, and may be a method of calculating the frequency ratio with a weighted sum that increases the weight of the recent history.
また、言語A音声認識部30、A−B機械翻訳部31、言語B音声合成部32、言語B音声認識部33、B−A機械翻訳部34、言語A音声合成部35の各モジュールの実行頻度が等しい場合は、初期化パターン情報42の追加処理時間情報42fを参照してパターンを選択するようにすると良い。
Also, the modules of the language A
また、A−B機械翻訳部31が事前初期化されていない状態(状態「0」または「1」)で、ユーザがテキストエディタ等で翻訳原文(音声認識部における出力文)を編集した場合(編集終了後のタイミングではなく、少しでも内容が変化したタイミングで)、ユーザが次に機械翻訳処理を実行する可能性が高いので、ユーザのテキスト編集の裏で並列処理でA−B機械翻訳部31を初期化しても良い。
Further, when the AB
同様に、言語B音声合成部33が事前初期化されていない状態(状態「0」または「1」)で、ユーザがテキストエディタ等で翻訳結果(音声合成部における読み上げ対象文)を編集した場合(編集終了後のタイミングではなく、少しでも内容が変化したタイミングで)、ユーザが次に音声合成処理を実行する可能性が高いので、ユーザのテキスト編集の裏で並列処理で言語B音声合成部33を初期化しても良い。
Similarly, when the language
また、携帯電話機1において、片方向ずつの事前初期化処理のみならず、両方向で行っても良い。この場合には、現在選択されている翻訳方向の事前初期化処理を行ったときに、RAM21の空きRAMサイズに余裕があれば、もう片方向の事前初期化処理を行うようにすると良い。ただし、現在選択されていない翻訳方向の初期化パターンは、翻訳処理に用いることができるRAM21のサイズから現在選択されている翻訳方向のピークRAMサイズを除いた値を基に判定するのではなく、翻訳処理に用いることができるRAM21のサイズを基に判定する。
Further, in the
これは、現在選択されていない翻訳方向の事前初期化は、翻訳方向を切替えたときに必要となるものであって、現在選択されている翻訳方向で事前に初期化されたデータは翻訳方向を切替えたときに解放しても良いためである。仮に、現在選択されていない翻訳方向の初期化パターンを、翻訳処理に用いることができるRAMサイズから現在選択されている翻訳方向のピークRAMサイズを除いた値を基に判定した場合、翻訳方向を切替えたときに、最も処理時間が短くなるような事前初期化パターンが選択されない場合がある。例えば、現在選択されていない翻訳方向の事前初期化パターンとして、追加処理時間が8秒のパターンAと0秒のパターンBがあり、翻訳処理に用いることができるRAMサイズを基に判定すると、両方のパターンが選択可能であるとする。そして、翻訳処理に用いることができるRAMサイズから現在選択されている翻訳方向のピークRAMサイズを除いた値を基に判定して、パターンAしか選択することができなかった時に、翻訳方向が選択されていない状態でパターンAに基づいて現在選択されていない翻訳方向のモジュールの事前初期化を行う場合がある。しかしながら、翻訳方向を切替えたときに、選択し得るパターンの内、最も追加処理時間が短くなるパターンはパターンBであるため、パターンBでの事前初期化が必要となり、パターンAで事前初期化を行っておいたモジュールを解放する必要が出てくる可能性がある。このように現在選択されていない翻訳方向の初期化パターンは、翻訳処理に用いることができるRAM21のサイズから現在選択されている翻訳方向のピークRAMサイズを除いた値を基に判定すると、非効率的な事前初期化が行われる場合があり、処理時間の増加につながる。
This is because pre-initialization of the translation direction that is not currently selected is necessary when the translation direction is switched. This is because it may be released when switched. If the initialization pattern of the translation direction that is not currently selected is determined based on the value obtained by removing the peak RAM size of the currently selected translation direction from the RAM size that can be used for the translation process, the translation direction is When switching, the pre-initialization pattern that shortens the processing time may not be selected. For example, there are a pattern A with an additional processing time of 8 seconds and a pattern B of 0 seconds as pre-initialization patterns in the translation direction that are not currently selected, and both are determined based on the RAM size that can be used for translation processing. It is assumed that these patterns can be selected. The translation direction is selected when only the pattern A can be selected based on a value obtained by removing the peak RAM size of the currently selected translation direction from the RAM size that can be used for the translation process. In some cases, a module in a translation direction that is not currently selected based on the pattern A is pre-initialized. However, when the translation direction is switched, the pattern that has the shortest additional processing time among the patterns that can be selected is the pattern B. Therefore, the pattern B needs to be pre-initialized. It may be necessary to release a module that has been done. The initialization pattern of the translation direction that is not currently selected as described above is inefficient if it is determined based on the value obtained by removing the peak RAM size of the currently selected translation direction from the size of the
現在選択されていない翻訳方向の初期化パターンを、翻訳処理に用いることができるRAM21のサイズを基に選択する場合の処理を具体的に説明する。例えば、現在選択されている翻訳方向が言語Bから言語Aへの方向である場合であって、翻訳処理に用いることができるRAM21のサイズを20MB、現在選択されている翻訳方向で初期化パターンを判定し、その初期化パターンで必要なピークRAMサイズが14MB必要であるとする。また、現在選択されていない翻訳方向(言語A→言語B)での各モジュールの初期化処理に必要なRAMサイズをM_Aa=10MB、M_Ma=10MB、M_Ta=6MBとし、現在選択されていない翻訳方向(言語A→言語B)での各モジュールの演算処理に必要なRAMサイズをM_Aa_w=5BM、M_Ma_w=4MB、M_Ta_w=3MBとし、各モジュールの初期化処理にかかる時間をT_Aa=8秒、T_Ma=4秒、T_Ta=1秒とする。この場合、現在選択されていない翻訳方向の初期化パターンの選択は、翻訳処理に用いることができるRAM21のサイズ20MBの範囲内に収まるピークRAMサイズを有し、追加初期化処理時間が短いパターンが選択される。各モジュールの演算処理に必要なRAMサイズの最大値M_wはmax(5MB、4MB、3MB)=5MBであるため、翻訳処理に用いることができるRAM21のサイズ20MBの範囲内に収まるピークRAMサイズを有する事前初期化のパターンは、現在選択されていない翻訳方向での各モジュールのいずれか1つを事前初期化するパターンとなる。これらのパターンの中で、追加初期化処理時間が短いパターンとして、言語A音声認識部30が初期化されるパターンが選択される。ただし、言語B→言語Aの翻訳方向が選択されている時点で、現在選択されていない翻訳方向(言語A→言語B)の初期化のためには、翻訳処理に用いることができるRAMサイズ20MBから現在選択されている翻訳方向(言語B→言語A)のピークRAMサイズ14MBを除いた6MBである。そのため、10MB必要な言語A音声認識部30の初期化を実行することができず、初期化状態情報44の言語A音声認識部30に対応する初期化状態を「1」に設定し、翻訳方向が切替えられた後に、事前初期化を行う。
A process for selecting an initialization pattern in the translation direction that is not currently selected based on the size of the
なお、上述の例では、一方の翻訳方向選択時に他方の翻訳方向の事前初期化ができない場合を示したが、一方の翻訳方向選択時に他方の翻訳方向の事前初期化ができる場合も考えられる。例えば、上述の例においてM_Ta=1MBの場合には、初期化パターンとして、言語A音声認識部30と言語B音声合成部32とが初期化されるパターンが選択される。この場合、言語B音声合成部32の事前初期化は、言語B→言語Aが選択されている場合にも実行できるため、言語B→言語Aが選択されているときに事前初期化を行っても良い。また、一方の翻訳方向選択時に他方の翻訳方向の事前初期化ができる場合、どちらの翻訳方向時であっても事前初期化をしておくことができるモジュールについては、翻訳方向の切り替えのたびに初期化したデータを解放する必要が無い。例えば、言語B音声合成部32の事前初期化を言語B→言語Aが選択されている場合にも実行できる場合、翻訳方向を言語A→言語Bから言語B→言語Aに切替えたとしても、言語B音声合成部32の初期化データを解放しなくても良い。
In the above-described example, the case where the pre-initialization of the other translation direction cannot be performed when one translation direction is selected is shown. However, the case where the other translation direction can be pre-initialized when one translation direction is selected is also conceivable. For example, in the above example, when M_Ta = 1 MB, a pattern for initializing the language A
なお、初期化状態情報44の更新は、翻訳機能の起動時/翻訳方向切り替え時/アプリ画面アクティブ時などに行うと良い。
The
また、1方向(例えば言語Aから言語Bへの翻訳)分の初期化タイミング決定して、そのタイミングに基づいて初期化を行った後、RAM21の空きRAMサイズに余裕が発生した段階で他方向(例えば言語Bから言語Aへの翻訳)分の初期化を行うようにしても良い。例えば、言語Aから言語Bへの翻訳を行っている間に、並列させて、処理が走っていない(例えばCPU20が表示処理のみを行っていて、ユーザの入力操作を待っている状態などの)ときに、他方向の初期化を行うようにしてもよい。
Further, after determining initialization timing for one direction (for example, translation from language A to language B) and performing initialization based on the timing, the other direction is generated when there is a margin in the free RAM size of the
あるいは、事前初期化は必ずしも事前に行わなくても良い。実際に演算処理(音声認識処理や機械翻訳処理など)が必要なタイミングで初期化処理を実行し、翻訳方向が変わるまでその初期化データの解放を行わないようにしても良い。 Alternatively, the pre-initialization is not necessarily performed in advance. It is also possible to execute the initialization process at a timing when an arithmetic process (speech recognition process, machine translation process, etc.) is actually required, and not release the initialization data until the translation direction changes.
また、携帯電話機1において翻訳制御処理を行う際、RAM21の空きRAMサイズに応じて、初期化されていないモジュールの初期化が可能であれば、初期化を促す情報を表示させてユーザに初期化の指示を促すようにしても良い。例えば、RAM21にあと3MBの空きRAMサイズがあれば、もう一つ分のモジュールの事前初期化が可能な場合には、ユーザにその旨を表示しても良い。
In addition, when performing translation control processing in the
具体的には、例えば実質空きRAMサイズM_maxに3MB加算した値を算出し、この値に基づいて、図8のフローチャートに示す方法で事前初期化パターン(パターン1〜8)を判定した結果が、3MB加算しない場合(M_maxに基づいて事前初期化パターンを判定する場合)と同じであるか否かを判定する。例えば、M_maxに3MB加算した値に基づいて判定した事前初期化パターンがパターン3であり、M_maxに基づいて判定した事前初期化パターンもパターン3である場合には、3MBの加算の有無に関わらず事前に初期化できるモジュールは変わらない。それに対して、例えば、M_maxに3MB加算した値に基づいて判定した事前初期化パターンがパターン2であり、M_maxに基づいて判定した事前初期化パターンもパターン3である場合には、空きRAMサイズがあと3MB確保できると事前初期化できるモジュールが増え、処理時間が削減される。M_maxに3MB加算した値に基づいて判定した事前初期化パターン(パターン2)の追加処理時間からM_maxに基づいて判定した事前初期化パターン(パターン3)の追加処理時間を減算し得られた値を、あと3MB確保することによって短縮できる処理時間であるとし、『空きRAMサイズをあと3MB確保すれば音声翻訳動作時間を2秒早く実行することができます。』などの表示を行う。
Specifically, for example, a value obtained by adding 3 MB to the actual free RAM size M_max is calculated, and based on this value, the result of determining the pre-initialization pattern (
以上の例では、実質空きRAMサイズに加算する値を3MBとして説明したが、3MBに限らず任意の値で良い。例えば、予め指定された値でも良いし、ユーザによって指定された値でも良い。また、1種類の値で判断するのではなく、複数段階の値(3MB、5MB、10MBなど)を用いて事前初期化パターンを判定し、判定結果を表示しても良い。さらに、実質空きRAMサイズに加算する値を0MBから徐々に(例えば1MBずつ)増やして事前初期化パターンを判定し、実質空きRAMサイズM_maxに基づいて判定される事前初期化パターンよりも事前に初期化されるモジュールが多い全てのパターンについて、実質空きRAMサイズに加算する最小値を求めても良い。 In the above example, the value added to the actual free RAM size has been described as 3 MB. However, the value is not limited to 3 MB, and may be any value. For example, a value designated in advance or a value designated by the user may be used. Further, instead of making a determination based on one type of value, a pre-initialization pattern may be determined using a plurality of values (3 MB, 5 MB, 10 MB, etc.), and the determination result may be displayed. Further, the value to be added to the actual free RAM size is gradually increased from 0 MB (for example, by 1 MB) to determine the pre-initialization pattern, and the initial value is initialized in advance from the pre-initialization pattern determined based on the real free RAM size M_max. The minimum value to be added to the substantially empty RAM size may be obtained for all patterns having many modules to be converted.
例えば、実質空きRAMサイズM_maxで判定した事前初期化パターンがパターン3であるときに、パターン3よりも事前初期化されるモジュールの多いパターン2とパターン1を選択するために実質空きRAMサイズM_maxに少なくとも何MBが必要であるかを判定し、パターン1の事前初期化を行うために必要な追加の空きRAMサイズとパターン2の事前初期化を行うために必要な追加の空きRAMサイズとを表示する。
For example, when the pre-initialization pattern determined by the real free RAM size M_max is the
またこのとき、実行中のアプリケーションプログラム(タスク)のいずれかを終了させることによりRAM21の空きRAMサイズを3MB以上確保できるかをユーザに表示しても良い。あるいは、実行中のアプリケーションプログラム(タスク)を強制終了させて、RAM1の空きRAMサイズを確保するようにしても良い。これらは、ユーザが事前に動作モードを設定できるようにしても良い。
At this time, it may be displayed to the user whether or not the free RAM size of the
本発明に係る情報処理装置(携帯電話機1)によると、スタンドアロンでの音声翻訳機能を備えているとともに、使用可能なRAM21のRAMサイズに制約がある場合においても、各々のモジュールの初期化タイミングを制御することで、音声翻訳処理時間を最小限に抑えることが可能となる。
The information processing apparatus (mobile phone 1) according to the present invention has a stand-alone speech translation function and the initialization timing of each module even when the RAM size of the
本発明の説明として、携帯電話機1について説明したが、これに限らず、PHS(Personal Handyphone System)、PDA(Personal Digital Assistants)、携帯ゲーム機、携帯音楽録再機など、翻訳機能を備えている情報処理装置であれば、任意の情報処理装置であっても良い。また、本発明は全ての低スペック機器に適用できるものであって、携帯端末に限定されず、組み込み機器一般や、テレビやパソコンの電気機器一般にも適用できる。
As the description of the present invention, the
1…携帯電話機,10…上筐体,11…下筐体,12…表示装置,12a…画面,12b…翻訳前言語表示欄,12c…翻訳後言語表示欄,12d…認識開始/終了ボタン,12e…出力開始ボタン,13…スピーカ,14…マイクロフォン、15…入力装置,20…CPU,21…RAM,22…ROM,23…通信装置,23a…アンテナ,30…言語A音声認識部(ASR_A),31…A−B機械翻訳部(MT_AB),32…言語B音声合成部(TTS_B),33…言語B音声認識部(ASR_B),34…B−A機械翻訳部(MT_B),35…言語A音声合成部(TTS_A),40…モジュールリスト情報,41…初期化時間情報,42…初期化パターン情報,43…識別符号と初期化状態との関係を示す対応表,44…初期化状態情報,45…履歴情報,46…初期化パターンの付加情報。
DESCRIPTION OF
Claims (6)
翻訳処理が実行される際、翻訳処理に使用できるRAMの空き領域を算出する第1の算出手段と、
前記空き領域および前記複数のモジュールの各々が処理を行う際に必要なRAMサイズと前記複数のモジュールの各々が事前に初期化を行う際に占有されるRAMサイズと前記複数のモジュールの各々が事前に初期化を行う際に要する時間とに基づいて前記複数のモジュールから事前に初期化可能なモジュールを選択する選択手段と、
前記選択手段により選択されたモジュールを翻訳処理が実行される前に初期化する第1の初期化手段と、
翻訳処理の実行に伴っていずれかのモジュールが処理を行う際、このモジュールが前記第1の初期化手段により初期化されていなかった場合、このモジュールの処理開始時にこのモジュール初期化する第2の初期化手段と、
を備えることを特徴とする情報処理装置。 An information processing apparatus having a plurality of modules related to translation processing,
A first calculating means for calculating an available RAM area that can be used for the translation process when the translation process is executed;
The free space and the RAM size required when each of the plurality of modules performs processing, the RAM size occupied when each of the plurality of modules is initialized in advance, and each of the plurality of modules are determined in advance. Selection means for selecting a module that can be initialized in advance from the plurality of modules based on the time required for initialization
First initialization means for initializing a module selected by the selection means before translation processing is executed;
When any module performs processing in accordance with the execution of the translation processing, if this module has not been initialized by the first initialization means, the second module that initializes this module at the start of processing of this module Initialization means;
An information processing apparatus comprising:
前記選択手段は、前記各モジュールが事前に初期化を行う際に要する時間と、前記複数のモジュールの各々の使用頻度に基づいて、追加の処理時間が最も短くなる1つのモジュールまたは複数のモジュールを判断することを特徴とする請求項2記載の情報処理装置。 Storage means for storing the frequency of use of a plurality of modules related to the translation processing for each module;
The selecting means selects one module or a plurality of modules having the shortest additional processing time based on the time required for the modules to perform initialization in advance and the frequency of use of each of the plurality of modules. The information processing apparatus according to claim 2, wherein the determination is made.
翻訳処理の方向を選択する翻訳方向選択手段を更に有し、
前記選択手段は、選択されていない方向の翻訳処理に用いられる複数のモジュールのうち事前に初期化を行うモジュールの選択を、前記第1の算出手段によって算出された翻訳処理に使用できるRAMの空き領域を用いて行うことを特徴とする請求項1記載の情報処理装置。 The translation process is a bidirectional translation process,
A translation direction selection means for selecting a direction of translation processing;
The selection means is a RAM free space that can be used for the translation processing calculated by the first calculation means to select a module to be initialized in advance among a plurality of modules used for translation processing in a direction not selected. The information processing apparatus according to claim 1, wherein the information processing apparatus uses a region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010003031A JP5287735B2 (en) | 2010-01-08 | 2010-01-08 | Information processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010003031A JP5287735B2 (en) | 2010-01-08 | 2010-01-08 | Information processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011141819A JP2011141819A (en) | 2011-07-21 |
JP5287735B2 true JP5287735B2 (en) | 2013-09-11 |
Family
ID=44457598
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010003031A Expired - Fee Related JP5287735B2 (en) | 2010-01-08 | 2010-01-08 | Information processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5287735B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3454332A4 (en) * | 2016-05-02 | 2019-05-01 | Sony Corporation | Control device, control method, and computer program |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07152765A (en) * | 1993-11-26 | 1995-06-16 | Canon Inc | Method and device for processing information |
JP4935107B2 (en) * | 2006-02-20 | 2012-05-23 | 富士ゼロックス株式会社 | Information processing device |
JP4974817B2 (en) * | 2007-09-03 | 2012-07-11 | キヤノン株式会社 | Start-up time shortening method, start-up device, and program |
JP5391918B2 (en) * | 2009-08-10 | 2014-01-15 | 株式会社リコー | Information processing apparatus, information processing method, and information processing program |
-
2010
- 2010-01-08 JP JP2010003031A patent/JP5287735B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2011141819A (en) | 2011-07-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109447234B (en) | Model training method, method for synthesizing speaking expression and related device | |
KR101932181B1 (en) | Speech recognition using device docking context | |
CN100403828C (en) | Portable digital mobile communication apparatus and voice control method and system thereof | |
AU2012227294B2 (en) | Speech recognition repair using contextual information | |
US5893063A (en) | Data processing system and method for dynamically accessing an application using a voice command | |
CN105264485A (en) | Providing content on multiple devices | |
KR20090099069A (en) | Method, apparatus and computer program product for providing flexible text based language identification | |
JP2006048058A (en) | Method and system to voice recognition of name by multi-language | |
Cohen | Embedded speech recognition applications in mobile phones: Status, trends, and challenges | |
CN110148403B (en) | Decoding network generation method, voice recognition method, device, equipment and medium | |
CN104992715A (en) | Interface switching method and system of intelligent device | |
JP5558284B2 (en) | Speech recognition system, speech recognition method, and speech recognition program | |
EP1899955B1 (en) | Speech dialog method and system | |
JP5287735B2 (en) | Information processing device | |
RU2324296C1 (en) | Method for message exchanging and devices for implementation of this method | |
WO2005031995A1 (en) | Method and apparatus for providing a text message | |
US20140337006A1 (en) | Method, system, and mobile terminal for realizing language interpretation in a browser | |
KR100380829B1 (en) | System and method for managing conversation -type interface with agent and media for storing program source thereof | |
KR20220118818A (en) | Electronic device and operation method thereof | |
CN111508481A (en) | Training method and device of voice awakening model, electronic equipment and storage medium | |
JP2002132291A (en) | Natural language interaction processor and method for the same as well as memory medium for the same | |
JP2000148176A (en) | Information processing device and method, serving medium, speech recognision system, speech synthesizing system, translation device and method, and translation system | |
KR101994780B1 (en) | Method and apparatus for registering shortcut key and excuting the shortcut key | |
Jadhav et al. | A Smart Texting System for Android Mobile Users | |
JP2003202890A (en) | Speech recognition device, and method and program thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20121003 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130507 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130520 |
|
LAPS | Cancellation because of no payment of annual fees |